Help us shape the future of Go! Take the 2026 Go Developer Survey

initialize

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "init",
	Short: "Initialize a new Flow project",
	Run: func(cmd *cobra.Command, args []string) {
		if !cli.ProjectExists(c.ConfigPath[0]) {
			proj := cli.InitProject()
			proj.Save(c.ConfigPath[0])

			fmt.Print(
				cli.Green(fmt.Sprintf("Initialized a new Flow project in %s\n\n", c.ConfigPath)),
			)
			fmt.Printf(
				"Start the Flow Emulator by running: %s\n",
				cli.Bold("flow project start-emulator"),
			)
		} else {
			fmt.Printf(
				"%s\n\nStart the Flow Emulator by running: %s\n",
				cli.Red(fmt.Sprintf("A Flow project already exists in %s", c.ConfigPath)),
				cli.Bold("flow project start-emulator"),
			)
		}
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL