 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func AddDeprecatedFlagAndBind[T any](v *viper.Viper, fs *pflag.FlagSet, pfn FlagFunc[T], name, bind string, value T, ...)
- func AddDeprecatedHackedStringSlice(fs *pflag.FlagSet, name, usage string)
- func AddFlagAndBind[T any](v *viper.Viper, fs *pflag.FlagSet, pfn FlagFunc[T], name, bind string, value T, ...)
- func AddFlagAndBindP[T any](v *viper.Viper, fs *pflag.FlagSet, pfn FlagPFunc[T], ...)
- func AddHackedStringSlice(fs *pflag.FlagSet, name, usage string)
- func AddHackedStringSliceP(fs *pflag.FlagSet, name, shorthand, usage string)
- type Builder
- type Configuration
- type FlagFunc
- type FlagPFunc
- type Plugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDeprecatedFlagAndBind ¶
func AddDeprecatedFlagAndBind[T any](v *viper.Viper, fs *pflag.FlagSet, pfn FlagFunc[T], name, bind string, value T, usage string)
AddDeprecatedFlagAndBind similar to AddFlagAndBind but deprecate the flag.
func AddDeprecatedHackedStringSlice ¶
AddDeprecatedHackedStringSlice similar to AddHackedStringSlice but deprecate the flag.
func AddFlagAndBind ¶
func AddFlagAndBind[T any](v *viper.Viper, fs *pflag.FlagSet, pfn FlagFunc[T], name, bind string, value T, usage string)
AddFlagAndBind adds a Cobra/pflag flag and binds it with Viper.
func AddFlagAndBindP ¶
func AddFlagAndBindP[T any](v *viper.Viper, fs *pflag.FlagSet, pfn FlagPFunc[T], name, shorthand, bind string, value T, usage string)
AddFlagAndBindP adds a Cobra/pflag flag and binds it with Viper.
func AddHackedStringSlice ¶
AddHackedStringSlice Hack for slice, see Loader.applyStringSliceHack.
func AddHackedStringSliceP ¶
AddHackedStringSliceP Hack for slice, see Loader.applyStringSliceHack.
Types ¶
type Builder ¶
type Builder struct {
	// contains filtered or unexported fields
}
    Builder runs all the required commands to build a binary.
func NewBuilder ¶
func NewBuilder(logger logutils.Log, cfg *Configuration, root string) *Builder
NewBuilder creates a new Builder.
type Configuration ¶
type Configuration struct {
	// golangci-lint version.
	Version string `yaml:"version"`
	// Name of the binary.
	Name string `yaml:"name,omitempty"`
	// Destination is the path to a directory to store the binary.
	Destination string `yaml:"destination,omitempty"`
	// Plugins information.
	Plugins []*Plugin `yaml:"plugins,omitempty"`
}
    Configuration represents the configuration file.
func LoadConfiguration ¶
func LoadConfiguration() (*Configuration, error)
func (*Configuration) Validate ¶
func (c *Configuration) Validate() error
Validate checks and clean the configuration.
type Plugin ¶
type Plugin struct {
	// Module name.
	Module string `yaml:"module"`
	// Import to use.
	Import string `yaml:"import,omitempty"`
	// Version of the module.
	// Only for module available through a Go proxy.
	Version string `yaml:"version,omitempty"`
	// Path to the local module.
	// Only for local module.
	Path string `yaml:"path,omitempty"`
}
    Plugin represents information about a plugin.
       Directories
      ¶
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| 
          
            cloner
            
            command
          
          
         | |
| 
          
            versionone
            
            
          
           Package versionone contains a modified copy of v1 configuration. | Package versionone contains a modified copy of v1 configuration. |