pkg/beam/examples/beamsh/beamsh.go
Solomon Hykes f4c6f14d0a pkg/dockerscript: expose a simple, clean API with a single Parse method
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 15:50:15 -07:00

19 lines
342 B
Go

package main
import (
"fmt"
"os"
"github.com/dotcloud/docker/pkg/dockerscript"
)
func main() {
script, err := dockerscript.Parse(os.Stdin)
if err != nil {
fmt.Fprintf(os.Stderr, "parse error: %v\n", err)
os.Exit(1)
}
fmt.Printf("%d commands:\n", len(script))
for i, cmd := range script {
fmt.Printf("%%%d: %s\n", i, cmd)
}
}