From 98e05eec6345f74fc067e571338e88b9e034c492 Mon Sep 17 00:00:00 2001 From: Chad Arimura Date: Fri, 26 May 2017 10:32:07 -0700 Subject: [PATCH] init cli changes, removed app create from initial walkthrough --- README.md | 3 --- fn/init.go | 12 ++++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e2c238c73..761547de3 100644 --- a/README.md +++ b/README.md @@ -88,9 +88,6 @@ func main() { Now run the following CLI commands: ```sh -# Create your first application -fn apps create myapp - # Initialize your function # This detects your runtime from the code above and creates a func.yaml fn init /hello diff --git a/fn/init.go b/fn/init.go index dc9904786..f07d7bb0a 100644 --- a/fn/init.go +++ b/fn/init.go @@ -99,7 +99,7 @@ func (a *initFnCmd) init(c *cli.Context) error { return err } if ff != nil { - return errors.New("function file already exists") + return errors.New("Function file already exists") } } @@ -130,7 +130,7 @@ func (a *initFnCmd) init(c *cli.Context) error { return err } - fmt.Println("func.yaml created.") + fmt.Println("func.yaml created") return nil } @@ -142,11 +142,11 @@ func (a *initFnCmd) buildFuncFile(c *cli.Context) error { a.name = c.Args().First() if a.name == "" || strings.Contains(a.name, ":") { - return errors.New("Please specify a name for your function in the following format /.\nTry: fn init /") + return errors.New("please specify a name for your function in the following format /.\nTry: fn init /") } if exists("Dockerfile") { - fmt.Println("Dockerfile found, will use that to build.") + fmt.Println("Dockerfile found. Let's use that to build...") return nil } @@ -181,7 +181,7 @@ func (a *initFnCmd) buildFuncFile(c *cli.Context) error { } } if a.entrypoint == "" && a.cmd == "" { - return fmt.Errorf("Could not detect entrypoint or cmd for %v, use --entrypoint and/or --cmd to set them explicitly", a.runtime) + return fmt.Errorf("could not detect entrypoint or cmd for %v, use --entrypoint and/or --cmd to set them explicitly", a.runtime) } return nil @@ -194,5 +194,5 @@ func detectRuntime(path string) (runtime string, err error) { return runtime, nil } } - return "", fmt.Errorf("No supported files found to guess runtime, please set runtime explicitly with --runtime flag") + return "", fmt.Errorf("no supported files found to guess runtime, please set runtime explicitly with --runtime flag.") }