package sub import ( "golang.flu0r1ne.net/planr" "fmt" "os" ) func Config(runner planr.Runner, params []string) { if len(params) != 1 { fmt.Fprintf(os.Stderr, "Usage: planr config \n") os.Exit(1) } key := params[0] switch key { case "builddir": fmt.Printf("%s\n", runner.BuildDir()) case "configdir": fmt.Printf("%s\n", runner.ConfigDir()) case "srcdir": fmt.Printf("%s\n", runner.SrcDir()) default: fmt.Fprintf(os.Stderr, "\"%s\" not found in configuration\n", key) } }