Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "execute", Short: "Execute a script", Example: `flow scripts execute --code=script.cdc --args="[{\"type\": \"String\", \"value\": \"Hello, Cadence\"}]"`, Run: func(cmd *cobra.Command, args []string) { code, err := ioutil.ReadFile(conf.Code) if err != nil { cli.Exitf(1, "Failed to read script from %s", conf.Code) } projectConf := new(cli.Config) if conf.Host == "" { projectConf = cli.LoadConfig() } // Arguments var scriptArguments []cadence.Value if conf.Args != "" { scriptArguments, err = cli.ParseArguments(conf.Args) if err != nil { cli.Exitf(1, "Invalid arguments passed: %s", conf.Args) } } cli.ExecuteScript(projectConf.HostWithOverride(conf.Host), code, scriptArguments...) }, }
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.