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

quick

package
v0.42.5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeployCommand = &command.Command{
	Cmd: &cobra.Command{
		Use:     "deploy",
		Short:   "Deploy all project contracts",
		Example: "flow deploy",
		Annotations: map[string]string{
			"HotCommand": "true",
		},
	},
	Flags: project.DeployCommand.Flags,
	RunS:  project.DeployCommand.RunS,
}

add deploy command

View Source
var InitCommand = &command.Command{
	Cmd: &cobra.Command{
		Use:     "init",
		Short:   "Initialize a new configuration",
		Example: "flow project init",
		Annotations: map[string]string{
			"HotCommand": "true",
		},
	},
	Flags: &config.InitFlag,
	Run:   config.Initialise,
}
View Source
var RunCommand = &command.Command{
	Cmd: &cobra.Command{
		Use:     "run",
		Short:   "Start emulator and deploy all project contracts",
		Example: "flow run",
		Annotations: map[string]string{
			"HotCommand": "true",
		},
	},
	Flags: &runFlags,
	Run: func(
		args []string,
		_ flowkit.ReaderWriter,
		globalFlags command.GlobalFlags,
		services *services.Services,
	) (command.Result, error) {
		var waitGroup sync.WaitGroup

		waitGroup.Add(2)
		go EmulatorHelper(args, globalFlags, services, &waitGroup)
		go DeployHelper(args, globalFlags, services, &waitGroup)

		waitGroup.Wait()

		emulator.Cmd.Run(emulator.Cmd, args)
		return &RunResult{}, nil
	},
}

RunCommand This command will act as an alias for running the emulator and deploying the contracts

Functions

func DeployHelper added in v0.29.0

func DeployHelper(args []string, globalFlags command.GlobalFlags, services *services.Services, wg *sync.WaitGroup)

func EmulatorHelper added in v0.29.0

func EmulatorHelper(args []string, globalFlags command.GlobalFlags, services *services.Services, wg *sync.WaitGroup)

Types

type RunResult added in v0.29.0

type RunResult struct {
}

func (*RunResult) JSON added in v0.29.0

func (r *RunResult) JSON() interface{}

func (*RunResult) Oneliner added in v0.29.0

func (r *RunResult) Oneliner() string

func (*RunResult) String added in v0.29.0

func (r *RunResult) String() string

Jump to

Keyboard shortcuts

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