@@ -84,14 +84,11 @@ func ExecWithExit(opts ...Option) *executable.Executable {
8484func ExecWithTimeout (opts ... Option ) * executable.Executable {
8585 name := "with-timeout"
8686 timeout := 3 * time .Second
87- docstring := "The `timeout` field can be set to limit the amount of time the executable will run.\n " +
88- "If the executable runs longer than the timeout, it will be killed and the execution will fail."
8987 e := & executable.Executable {
90- Verb : "run" ,
91- Name : name ,
92- Visibility : privateExecVisibility (),
93- Description : docstring ,
94- Timeout : & timeout ,
88+ Verb : "run" ,
89+ Name : name ,
90+ Visibility : privateExecVisibility (),
91+ Timeout : & timeout ,
9592 Exec : & executable.ExecExecutableType {
9693 Cmd : fmt .Sprintf ("sleep %d" , int (timeout .Seconds ()+ 10 )),
9794 },
@@ -105,17 +102,10 @@ func ExecWithTimeout(opts ...Option) *executable.Executable {
105102
106103func ExecWithTmpDir (opts ... Option ) * executable.Executable {
107104 name := "with-tmp-dir"
108- docstring := fmt .Sprintf (
109- "Executables will be run from a new temporary direction when the `dir` field is set to `%s`.\n " +
110- "If the executable is a parallel or serial executable, all sub-executables will run from the same temporary directory.\n " +
111- "Any files created during the execution will be deleted after the executable completes." ,
112- executable .TmpDirLabel ,
113- )
114105 e := & executable.Executable {
115- Verb : "run" ,
116- Name : name ,
117- Visibility : privateExecVisibility (),
118- Description : docstring ,
106+ Verb : "run" ,
107+ Name : name ,
108+ Visibility : privateExecVisibility (),
119109 Exec : & executable.ExecExecutableType {
120110 Dir : executable .Directory (executable .TmpDirLabel ),
121111 Cmd : fmt .Sprintf ("echo 'hello from %[1]s';mkdir %[1]s; cd %[1]s; pwd" , name ),
@@ -140,19 +130,10 @@ func ExecWithArgs(opts ...Option) *executable.Executable {
140130 argCmds = append (argCmds , fmt .Sprintf ("echo 'flag=%s, key=%s'" , arg .Flag , arg .EnvKey ))
141131 }
142132 }
143- docstring := "Command line arguments can be passed to the executable using the `args` field.\n " +
144- "Arguments can be positional or flags, and can have default values.\n " +
145- "**You must specify the `envKey` field for each argument and one of `pos` or `flag`** " +
146- "The value of the argument will be available in the environment variable specified by `envKey`.\n " +
147- "The first positional argument is at position 1 and following arguments are at increasing positions. " +
148- "Flags are specified with the defined flag value and is followed by `=` and it's value (no spaces).\n " +
149- "If a default value is provided, it will be used if the argument is not provided. The executable will " +
150- "fail if a required argument is not provided."
151133 e := & executable.Executable {
152- Verb : "run" ,
153- Name : name ,
154- Visibility : privateExecVisibility (),
155- Description : docstring ,
134+ Verb : "run" ,
135+ Name : name ,
136+ Visibility : privateExecVisibility (),
156137 Exec : & executable.ExecExecutableType {
157138 Args : args ,
158139 Cmd : fmt .Sprintf ("echo 'hello from %s'; %s" , name , strings .Join (argCmds , "; " )),
@@ -167,11 +148,6 @@ func ExecWithArgs(opts ...Option) *executable.Executable {
167148
168149func ExecWithParams (opts ... Option ) * executable.Executable {
169150 name := "with-params"
170- docstring := "Parameters can be passed to the executable using the `params` field.\n " +
171- "Parameters can be text, secrets, or prompts. Text parameters will be available in the environment variable " +
172- "specified by `envKey`. Secret parameters will be resolved from the secret store and will be available in the " +
173- "environment variable specified by `envKey`. Prompt parameters will prompt the user for a value and will be " +
174- "available in the environment variable specified by `envKey`."
175151 params := executable.ParameterList {
176152 {EnvKey : "PARAM1" , Text : "value1" },
177153 {EnvKey : "PARAM2" , SecretRef : "flow-example-secret" },
@@ -195,10 +171,9 @@ func ExecWithParams(opts ...Option) *executable.Executable {
195171 }
196172 }
197173 e := & executable.Executable {
198- Verb : "run" ,
199- Name : name ,
200- Visibility : privateExecVisibility (),
201- Description : docstring ,
174+ Verb : "run" ,
175+ Name : name ,
176+ Visibility : privateExecVisibility (),
202177 Exec : & executable.ExecExecutableType {
203178 Params : params ,
204179 Cmd : fmt .Sprintf ("echo 'hello from %s'; %s" , name , strings .Join (paramCmds , "; " )),
@@ -213,13 +188,10 @@ func ExecWithParams(opts ...Option) *executable.Executable {
213188
214189func ExecWithLogMode (opts ... Option ) * executable.Executable {
215190 name := "with-plaintext"
216- docstring := "The `logMode` field can be set to change the formatting of the executable's output logs.\n " +
217- "Valid values are `logfmt`, `text`, `json`, and `hidden`. The default value is determined by the user's configuration."
218191 e := & executable.Executable {
219- Verb : "run" ,
220- Name : name ,
221- Visibility : privateExecVisibility (),
222- Description : docstring ,
192+ Verb : "run" ,
193+ Name : name ,
194+ Visibility : privateExecVisibility (),
223195 Exec : & executable.ExecExecutableType {
224196 LogMode : tuikitIO .Text ,
225197 Cmd : fmt .Sprintf (
0 commit comments