execute

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "execute <script.cdc>",
	Short: "Execute a script",
	Args:  cobra.ExactArgs(1),
	Run: func(cmd *cobra.Command, args []string) {
		code, err := ioutil.ReadFile(args[0])
		if err != nil {
			cli.Exitf(1, "Failed to read script from %s", args[0])
		}
		projectConf := new(cli.Config)
		if conf.Host == "" {
			projectConf = cli.LoadConfig()
		}
		cli.ExecuteScript(projectConf.HostWithOverride(conf.Host), code)
	},
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Host string `flag:"host" info:"Flow Access API host address"`
}

Jump to

Keyboard shortcuts

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