Documentation ¶
Index ¶
- func CheckArgs(arg ...string)
- func CheckIfError(err error)
- func Info(format string, args ...interface{})
- func MustReadFile(path string) []byte
- func RemoveContents(dir string) error
- func RunCommand(name string, args ...string)
- func Warning(format string, args ...interface{})
- type DocsConfig
- type DocsYamlConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckArgs ¶
func CheckArgs(arg ...string)
CheckArgs should be used to ensure the right command line arguments are passed before executing an example.
func CheckIfError ¶
func CheckIfError(err error)
CheckIfError should be used to naively panics if an error is not nil.
func Info ¶
func Info(format string, args ...interface{})
Info should be used to describe the example commands that are about to run.
func MustReadFile ¶
MustReadFile read a file based on a given path and return an array of bytes
func RemoveContents ¶
RemoveContents remove all folders of a given dir except docs folder
Types ¶
type DocsConfig ¶
type DocsConfig struct {
// contains filtered or unexported fields
}
DocsConfig config data structure for config yaml file parser
func NewDocsConfig ¶
func NewDocsConfig(fileName string) *DocsConfig
NewDocsConfig returns an instance of DocsConfig data structure
func (*DocsConfig) GetDocsYamlConfig ¶
func (c *DocsConfig) GetDocsYamlConfig() DocsYamlConfig
GetDocsYamlConfig return the docs yaml config data structure
type DocsYamlConfig ¶
type DocsYamlConfig struct { Versions []struct { Ver string `yaml:"ver"` Repos []struct { Name string `yaml:"name"` URL string `yaml:"url"` TagName string `yaml:"tagName"` } `yaml:"repos"` } `yaml:"versions"` }
DocsYamlConfig corresponding golang structure for a versions yaml file