models

package
v0.0.0-...-811c986 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDefaultOptions

func SetDefaultOptions(opts *Opts)

We are parsing ini files to have default values and then parse the options from the command line but the default values of go-flags overwrites the values from the ini configuration files so this function sets the default manually only when the fields are empty

Types

type Host

type Host interface {
	SubmitPr(*MRParams) (*MRInfo, error)
}

Host is the interface for hosts to be used

type MRInfo

type MRInfo struct {
	URL string
}

type MRParams

type MRParams struct {
	URL     string
	Head    string
	Base    string
	Message string
}

type Opts

type Opts struct {
	Verbose []bool `short:"v" long:"verbose" description:"Add logs, you can have more logs by calling it more times" ini:"verbose"`

	Head string `` /* 155-byte string literal not displayed */
	Base string `short:"b" long:"base" description:"The base branch you want to merge into" default-mask:"master" ini:"base"`

	Message string `` /* 138-byte string literal not displayed */

	Force bool `` /* 137-byte string literal not displayed */

	Clipboard bool `long:"clipboard" short:"c" description:"Copy the URLs of your merge requests to your clipboard" ini:"clipboard"`

	Remote     string   `long:"remote" description:"The remote to use" default-mask:"origin" ini:"remote"`
	RemoteURLs []string `` /* 130-byte string literal not displayed */

	ForceEdit bool `` /* 127-byte string literal not displayed */

	Delete string `long:"delete-creds" description:"Use this option when you want to delete the credentials of an host"`
}

Opts represents the options passed from command line

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL