Skip to content

Instantly share code, notes, and snippets.

@nleiva
Last active September 14, 2020 17:17
Show Gist options
  • Save nleiva/07cdfe0e88076c8ae6db2d3eca731f84 to your computer and use it in GitHub Desktop.
Save nleiva/07cdfe0e88076c8ae6db2d3eca731f84 to your computer and use it in GitHub Desktop.
// ModuleArgs are the module inputs
type ModuleArgs struct {
Time string
}
func main() {
...
argsFile := os.Args[1]
text, err := ioutil.ReadFile(argsFile)
...
var moduleArgs ModuleArgs
err = json.Unmarshal(text, &moduleArgs)
...
busy, err := isItBusy(moduleArg.time)
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment