update

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveFromFile

func RemoveFromFile(path string, o Options, source string, license string, err error) error

Types

type Config

type Config struct {
	Golic struct {
		Licenses map[string]string `yaml:"licenses"`
		Rules    map[string]struct {
			Prefix string   `yaml:"prefix"`
			Suffix string   `yaml:"suffix"`
			Under  []string `yaml:"under"`
		} `yaml:"rules"`
	} `yaml:"golic"`
}

func (*Config) IsWrapped

func (c *Config) IsWrapped(key string) bool

type LicenseCommandType

type LicenseCommandType int
const (
	LicenseInject LicenseCommandType = 0
	LicenseRemove LicenseCommandType = 1
)

type Options

type Options struct {
	LicIgnore          string
	Copyright          string
	Dry                bool
	ConfigPath         string
	Template           string
	ModifiedExitStatus bool
	MasterConfig       string
	Type               LicenseCommandType
}

type Update

type Update struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, options Options) *Update

func (*Update) ExitCode

func (u *Update) ExitCode() int

func (*Update) Run

func (u *Update) Run() (err error)

func (*Update) String

func (u *Update) String() string

Jump to

Keyboard shortcuts

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