Documentation
¶
Index ¶
Constants ¶
const FileName = "butler.json"
FileName is the name of the config file
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildConfig ¶
type BuildConfig struct { OutputPath string `json:"output_path"` // The path of the executable to generate LDFlags []string `json:"ld_flags"` // The ldflags to pass to the build command LDFlagsDarwin []string `json:"ld_flags_darwin"` // The ldflags to pass to the build command for Darwin LDFlagsLinux []string `json:"ld_flags_linux"` // The ldflags to pass to the build command for Linux LDFlagsWindows []string `json:"ld_flags_windows"` // The ldflags to pass to the build command for Windows ExtraArgs []string `json:"extra_args"` // The extra arguments to pass to the build command UseGotip bool `json:"use_gotip"` // Use gotip to build instead of Go itself }
BuildConfig contains the build specific configuration settings
type Config ¶
type Config struct { Project ProjectConfig `json:"project"` // Project contains the general project variables Build BuildConfig `json:"build"` // Build contains the build specific project variables Package PackageConfig `json:"package"` // Build contains the package specific project variables Run RunConfig `json:"run"` // Build contains the run specific project variables Test TestConfig `json:"test"` // Build contains the test specific project variables Staticcheck StaticcheckConfig `json:"staticcheck"` // Staticcheck contains the settings for staticcheck DockerImage DockerImageConfig `json:"docker-image"` // Staticcheck contains the settings for creating a docker image }
Config defines the project configuration
func NewConfigFromDir ¶
NewConfigFromDir parses the config from a file called "butler.json" which should be present in the specified path
func NewConfigFromPath ¶
NewConfigFromPath reads the configuration file from the specified path and returns the configuration settings
type DockerImageConfig ¶
type DockerImageConfig struct { Name string `json:"name"` // The name of the Docker image to create Repository string `json:"repository"` // The repository to push to Tag string `json:"tag"` // What should be used as the tag, either "revision" or "version". Defaults to "version" PruneAfterBuild bool `json:"prune_images_after_build"` // Perform the image prune after building }
DockerImageConfig contains the settings for docker-image
type PackageConfig ¶
type PackageConfig struct {
IncludeReadme bool `json:"include_readme"` // Include the readme when packaging or not
}
PackageConfig contains the build specific configuration settings
type ProjectConfig ¶
type ProjectConfig struct { Name string `json:"name"` // The name of the project Version string `json:"version"` // The version of the project Description string `json:"description"` // The description of the project Copyright string `json:"copyright"` // The copyright statement for the project MainPackage string `json:"main_package"` // The package path to the main entry point (the package containing main) }
ProjectConfig contains the general project variables
type RunConfig ¶
type RunConfig struct {
Environ map[string]string `json:"environ"` // The environment variables to use when running
}
RunConfig contains the run specific configuration settings
type StaticcheckConfig ¶
type StaticcheckConfig struct {
Checks []string `json:"checks"` // The checks which should be executed
}
StaticcheckConfig contains the settings for staticcheck
type TestConfig ¶
type TestConfig struct {
ExtraArgs []string `json:"extra_args"` // The extra arguments to pass to the test command
}
TestConfig contains the test specific configuration settings