package main import ( "fmt" "os" ) type templateData struct { SiteTitle string Pages map[string]page Index int } func main() { // show usage if config file is missing if len(os.Args) < 2 { fmt.Println("Usage: godocs ") os.Exit(1) } // read config file specified in the command line cfg, err := readConfig(os.Args[1]) if err != nil { panic(err) } // collect all entries entries, err := findEntries(cfg) if err != nil { panic(err) } // render all entries var pages = make(map[string]page) for _, e := range entries { fmt.Println("Processing page") e.render(pages) fmt.Println(pages) fmt.Println("**************") } fmt.Println("----------------------------------------------------------------------------------------------") fmt.Println(pages) }