github.com/technosophos/deis@v1.7.1-0.20150915173815-f9005256004b/builder/src/get-app-values.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "io/ioutil" 6 "os" 7 8 "github.com/deis/deis/builder" 9 ) 10 11 func main() { 12 if fi, _ := os.Stdin.Stat(); fi.Mode()&os.ModeNamedPipe == 0 { 13 fmt.Println("this app only works using the stdout of another process") 14 os.Exit(1) 15 } 16 17 bytes, err := ioutil.ReadAll(os.Stdin) 18 if err != nil { 19 panic(err) 20 } 21 22 values, err := builder.ParseControllerConfig(bytes) 23 24 if err != nil { 25 fmt.Println(err) 26 os.Exit(1) 27 } 28 29 for _, value := range values { 30 fmt.Println(value) 31 } 32 }