Lines Matching defs:Config
3 // doc expects to be given the path to a JSON file via the --config option.
4 // From that JSON (which is defined by the Config struct) it reads a list of
23 // Config describes the structure of the config JSON file.
24 type Config struct {
276 func (config *Config) parseHeader(path string) (*HeaderFile, error) {
277 headerPath := filepath.Join(config.BaseDirectory, path)
550 func generate(outPath string, config *Config) (map[string]string, error) {
618 for _, section := range config.Sections {
620 header, err := config.parseHeader(headerPath)
648 func generateIndex(outPath string, config *Config, headerDescriptions map[string]string) error {
691 if err := indexTmpl.Execute(file, config); err != nil {
708 configFlag *string = flag.String("config", "doc.config", "Location of config file")
710 config Config
716 fmt.Printf("No config file given by --config\n")
727 fmt.Printf("Failed to open config file: %s\n", err)
731 if err := json.Unmarshal(configBytes, &config); err != nil {
732 fmt.Printf("Failed to parse config file: %s\n", err)
736 headerDescriptions, err := generate(*outputDir, &config)
742 if err := generateIndex(*outputDir, &config, headerDescriptions); err != nil {