{"id":13836883,"url":"https://github.com/go-godo/godo","last_synced_at":"2025-12-17T05:49:08.156Z","repository":{"id":18354350,"uuid":"21534340","full_name":"go-godo/godo","owner":"go-godo","description":"golang build tool in the spirt of rake, gulp","archived":false,"fork":false,"pushed_at":"2018-04-25T01:27:22.000Z","size":271,"stargazers_count":535,"open_issues_count":27,"forks_count":32,"subscribers_count":14,"default_branch":"v2","last_synced_at":"2025-10-05T21:19:23.707Z","etag":null,"topics":["build","go","task-runner","watcher"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-godo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES-V2.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-06T05:41:00.000Z","updated_at":"2025-09-15T15:59:30.000Z","dependencies_parsed_at":"2022-08-07T09:00:39.673Z","dependency_job_id":null,"html_url":"https://github.com/go-godo/godo","commit_stats":null,"previous_names":["mgutz/gosu"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/go-godo/godo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-godo%2Fgodo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-godo%2Fgodo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-godo%2Fgodo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-godo%2Fgodo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-godo","download_url":"https://codeload.github.com/go-godo/godo/tar.gz/refs/heads/v2","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-godo%2Fgodo/sbom","scorecard":{"id":431881,"data":{"date":"2025-08-11","repo":{"name":"github.com/go-godo/godo","commit":"b0de4ae4bf6fb493425e157c54f8cf2049c4931c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":1,"reason":"Found 5/28 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'v2'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 7 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T03:33:50.240Z","repository_id":18354350,"created_at":"2025-08-19T03:33:50.240Z","updated_at":"2025-08-19T03:33:50.240Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27778124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-17T02:00:08.291Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","go","task-runner","watcher"],"created_at":"2024-08-04T15:00:56.378Z","updated_at":"2025-12-17T05:49:08.138Z","avatar_url":"https://github.com/go-godo.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"**Documentation is WIP**\n\n# godo\n\n[![GoDoc](https://godoc.org/github.com/go-godo/godo?status.svg)](https://godoc.org/github.com/go-godo/godo)\n\ngodo is a task runner and file watcher for golang in the spirit of\nrake, gulp.\n\nTo install\n\n    go get -u gopkg.in/godo.v2/cmd/godo\n\n## Godofile\n\nGodo runs `Gododir/main.go`.\n\nAs an example, create a file **Gododir/main.go** with this content\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    do \"gopkg.in/godo.v2\"\n)\n\nfunc tasks(p *do.Project) {\n    do.Env = `GOPATH=.vendor::$GOPATH`\n\n    p.Task(\"default\", do.S{\"hello\", \"build\"}, nil)\n\n    p.Task(\"hello\", nil, func(c *do.Context) {\n        name := c.Args.AsString(\"name\", \"n\")\n        if name == \"\" {\n            c.Bash(\"echo Hello $USER!\")\n        } else {\n            fmt.Println(\"Hello\", name)\n        }\n    })\n\n    p.Task(\"assets?\", nil,  func(c *do.Context) {\n        // The \"?\" tells Godo to run this task ONLY ONCE regardless of\n        // how many tasks depend on it. In this case watchify watches\n        // on its own.\n\t    c.Run(\"watchify public/js/index.js d -o dist/js/app.bundle.js\")\n    }).Src(\"public/**/*.{css,js,html}\")\n\n    p.Task(\"build\", do.S{\"views\", \"assets\"}, func(c *do.Context) {\n        c.Run(\"GOOS=linux GOARCH=amd64 go build\", do.M{\"$in\": \"cmd/server\"})\n    }).Src(\"**/*.go\")\n\n    p.Task(\"server\", do.S{\"views\", \"assets\"}, func(c *do.Context) {\n        // rebuilds and restarts when a watched file changes\n        c.Start(\"main.go\", do.M{\"$in\": \"cmd/server\"})\n    }).Src(\"server/**/*.go\", \"cmd/server/*.{go,json}\").\n       Debounce(3000)\n\n    p.Task(\"views\", nil, func(c *do.Context) {\n        c.Run(\"razor templates\")\n    }).Src(\"templates/**/*.go.html\")\n}\n\nfunc main() {\n    do.Godo(tasks)\n}\n```\n\nTo run \"server\" task from parent dir of `Gododir/`\n\n    godo server\n\nTo rerun \"server\" and its dependencies whenever any of their watched files change\n\n    godo server --watch\n\nTo run the \"default\" task which runs \"hello\" and \"build\"\n\n    godo\n\nTask names may add a \"?\" suffix to execute only once even when watching\n\n```go\n// build once regardless of number of dependents\np.Task(\"assets?\", nil, func(*do.Context) { })\n```\n\nTask dependencies\n\n    do.S{} or do.Series{} - dependent tasks to run in series\n    do.P{} or do.Parallel{} - dependent tasks to run in parallel\n\n    For example, do.S{\"clean\", do.P{\"stylesheets\", \"templates\"}, \"build\"}\n\n\n### Task Option Funcs\n\n*   Task#Src() - specify watch paths or the src files for Task#Dest()\n\n        Glob patterns\n\n            /**/   - match zero or more directories\n            {a,b}  - match a or b, no spaces\n            *      - match any non-separator char\n            ?      - match a single non-separator char\n            **/    - match any directory, start of pattern only\n            /**    - match any in this directory, end of pattern only\n            !      - removes files from result set, start of pattern only\n\n*   Task#Dest(globs ...string) - If globs in Src are newer than Dest, then\n    the task is run\n\n*   Task#Desc(description string) - Set task's description in usage.\n\n*   Task#Debounce(duration time.Duration) - Disallow a task from running until duration\n    has elapsed.\n\n*   Task#Deps(names ...interface{}) - Can be `S, Series, P, Parallel, string`\n\n\n### Task CLI Arguments\n\nTask CLI arguments follow POSIX style flag convention\n(unlike go's built-in flag package). Any command line arguments\nsucceeding `--` are passed to each task. Note, arguments before `--`\nare reserved for `godo`.\n\nAs an example,\n\n```go\np.Task(\"hello\", nil, func(c *do.Context) {\n    // \"(none)\" is the default value\n    msg := c.Args.MayString(\"(none)\", \"message\", \"msg\", \"m\")\n    var name string\n    if len(c.Args.NonFlags()) == 1 {\n        name = c.Args.NonFlags()[0]\n    }\n    fmt.Println(msg, name)\n})\n```\n\nrunning\n\n```sh\n# prints \"(none)\"\ngodo hello\n\n# prints \"Hello dude\" using POSIX style flags\ngodo hello -- dude --message Hello\ngodo hello -- dude --msg Hello\ngodo hello -- -m Hello dude\n```\n\nArgs functions are categorized as\n\n*  `Must*` - Argument must be set by user or panic.\n\n    ```go\nc.Args.MustInt(\"number\", \"n\")\n```\n\n*  `May*` - If argument is not set, default to first value.\n\n    ```go\n// defaults to 100\nc.Args.MayInt(100, \"number\", \"n\")\n```\n\n*  `As*` - If argument is not set, default to zero value.\n\n    ```go\n// defaults to 0\nc.Args.AsInt(\"number\", \"n\")\n```\n\n\n## Modularity and Namespaces\n\nA project may include other tasks functions with `Project#Use`. `Use` requires a namespace to\nprevent task name conflicts with existing tasks.\n\n```go\nfunc buildTasks(p *do.Project) {\n    p.Task(\"default\", S{\"clean\"}, nil)\n\n    p.Task(\"clean\", nil, func(*do.Context) {\n        fmt.Println(\"build clean\")\n    })\n}\n\nfunc tasks(p *do.Project) {\n    p.Use(\"build\", buildTasks)\n\n    p.Task(\"clean\", nil, func(*do.Context) {\n        fmt.Println(\"root clean\")\n    })\n\n    p.Task(\"build\", do.S{\"build:default\"}, func(*do.Context) {\n        fmt.Println(\"root clean\")\n    })\n}\n```\n\nRunning `godo build:.` or `godo build` results in output of `build clean`. Note that\nit uses the `clean` task in its namespace not the `clean` in the parent project.\n\nThe special name `build:.` is alias for `build:default`.\n\nTask dependencies that start with `\"/\"` are relative to the parent project and\nmay be called referenced from sub projects.\n\n## godobin\n\n`godo` compiles `Godofile.go` to `godobin-VERSION` (`godobin-VERSION.exe` on Windows) whenever\n`Godofile.go` changes. The binary file is built into the same directory as\n`Godofile.go` and should be ignored by adding the path `godobin*` to `.gitignore`.\n\n## Exec functions\n\nAll of these functions accept a `map[string]interface{}` or `M` for\noptions. Option keys that start with `\"$\"` are reserved for `godo`.\nOther fields can be used as context for template.\n\n### Bash\n\nBash functions uses the bash executable and may not run on all OS.\n\nRun a bash script string. The script can be multiline line with continutation.\n\n```go\nc.Bash(`\n    echo -n $USER\n    echo some really long \\\n        command\n`)\n```\n\nBash can use Go templates\n\n```go\nc.Bash(`echo -n {{.name}}`, do.M{\"name\": \"mario\", \"$in\": \"cmd/bar\"})\n```\n\nRun a bash script and capture STDOUT and STDERR.\n\n```go\noutput, err := c.BashOutput(`echo -n $USER`)\n```\n\n### Run\n\nRun `go build` inside of cmd/app and set environment variables.\n\n```go\nc.Run(`GOOS=linux GOARCH=amd64 go build`, do.M{\"$in\": \"cmd/app\"})\n```\n\nRun can use Go templates\n\n```go\nc.Run(`echo -n {{.name}}`, do.M{\"name\": \"mario\", \"$in\": \"cmd/app\"})\n```\n\nRun and capture STDOUT and STDERR\n\n```go\noutput, err := c.RunOutput(\"whoami\")\n```\n\n### Start\n\nStart an async command. If the executable has suffix \".go\" then it will be \"go install\"ed then executed.\nUse this for watching a server task.\n\n```go\nc.Start(\"main.go\", do.M{\"$in\": \"cmd/app\"})\n```\n\nGodo tracks the process ID of started processes to restart the app gracefully.\n\n### Inside\n\nTo run many commands inside a directory, use `Inside` instead of the `$in` option.\n`Inside` changes the working directory.\n\n```go\ndo.Inside(\"somedir\", func() {\n    do.Run(\"...\")\n    do.Bash(\"...\")\n})\n```\n\n## User Input\n\nTo get plain string\n\n```go\nuser := do.Prompt(\"user: \")\n```\n\nTo get password\n\n```go\npassword := do.PromptPassword(\"password: \")\n```\n\n## Godofile Run-Time Environment\n\n### From command-line\n\nEnvironment variables may be set via key-value pairs as arguments to\ngodo. This feature was added to facilitate users on Windows.\n\n```sh\ngodo NAME=mario GOPATH=./vendor hello\n```\n\n### From source code\n\nTo specify whether to inherit from parent's process environment,\nset `InheritParentEnv`. This setting defaults to true\n\n```go\ndo.InheritParentEnv = false\n```\n\nTo specify the base environment for your tasks, set `Env`.\nSeparate with whitespace or newlines.\n\n```go\ndo.Env = `\n    GOPATH=.vendor::$GOPATH\n    PG_USER=mario\n`\n```\n\nFunctions can add or override environment variables as part of the command string.\nNote that environment variables are set before the executable similar to a shell;\nhowever, the `Run` and `Start` functions do not use a shell.\n\n```go\np.Task(\"build\", nil, func(c *do.Context) {\n    c.Run(\"GOOS=linux GOARCH=amd64 go build\" )\n})\n```\n\nThe effective environment for exec functions is: `parent (if inherited) \u003c- do.Env \u003c- func parsed env`\n\nPaths should use `::` as a cross-platform path list separator. On Windows `::` is replaced with `;`.\nOn Mac and linux `::` is replaced with `:`.\n\n### From godoenv file\n\nFor special circumstances where the GOPATH needs to be set before building the Gododir,\nuse `Gododir/godoenv` file.\n\nTIP: Create `Gododir/godoenv` when using a dependency manager like `godep` that necessitates\nchanging `$GOPATH`\n\n```\n# Gododir/godoenv\nGOPATH=$PWD/cmd/app/Godeps/_workspace::$GOPATH\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-godo%2Fgodo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-godo%2Fgodo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-godo%2Fgodo/lists"}