config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalConfig

type GlobalConfig struct {
	Author   string            `json:"author"`
	FileName string            `json:"filename"`
	Scripts  map[string]string `json:"scripts"`
}

func GlobalConfigFromViper

func GlobalConfigFromViper(v *viper.Viper) (*GlobalConfig, error)

func NewGlobalConfig

func NewGlobalConfig(author string, filename string, scripts map[string]string) *GlobalConfig

type ProjectConfig

type ProjectConfig struct {
	Name        string            `json:"name"`
	Version     string            `json:"version"`
	Description string            `json:"description"`
	Author      string            `json:"author"`
	Scripts     map[string]string `json:"scripts"`
}

func NewProjectConfig

func NewProjectConfig(name string, version string, description string, author string, scripts map[string]string) *ProjectConfig

func ParseMergeProjectConfigFile

func ParseMergeProjectConfigFile(globalConfig *GlobalConfig) (*ProjectConfig, error)

func ParseProjectConfigFile

func ParseProjectConfigFile(filePath string) (*ProjectConfig, error)

func (*ProjectConfig) MergeGlobalConfig

func (projectConfig *ProjectConfig) MergeGlobalConfig(globalConfig *GlobalConfig) *ProjectConfig

func (*ProjectConfig) RunScript

func (projectConfig *ProjectConfig) RunScript(scriptName string) error

func (*ProjectConfig) RunScriptArgs

func (projectConfig *ProjectConfig) RunScriptArgs(scriptName string, arguments []string) error

func (*ProjectConfig) WriteToFile

func (projectConfig *ProjectConfig) WriteToFile(filePath string) error

Jump to

Keyboard shortcuts

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