{"id":15659827,"url":"https://github.com/code-hex/go-version-update","last_synced_at":"2025-05-05T19:53:51.846Z","repository":{"id":57507395,"uuid":"78023698","full_name":"Code-Hex/go-version-update","owner":"Code-Hex","description":"Update the version string of your go project.","archived":false,"fork":false,"pushed_at":"2017-01-06T12:12:17.000Z","size":984,"stargazers_count":20,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T23:12:14.320Z","etag":null,"topics":[],"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/Code-Hex.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-01-04T14:40:55.000Z","updated_at":"2024-01-04T16:10:16.000Z","dependencies_parsed_at":"2022-09-26T18:21:32.259Z","dependency_job_id":null,"html_url":"https://github.com/Code-Hex/go-version-update","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fgo-version-update","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fgo-version-update/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fgo-version-update/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code-Hex%2Fgo-version-update/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Code-Hex","download_url":"https://codeload.github.com/Code-Hex/go-version-update/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252567347,"owners_count":21769217,"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","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":[],"created_at":"2024-10-03T13:19:20.749Z","updated_at":"2025-05-05T19:53:51.829Z","avatar_url":"https://github.com/Code-Hex.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-version-update\n[![Go Report Card](https://goreportcard.com/badge/github.com/Code-Hex/go-version-update)](https://goreportcard.com/report/github.com/Code-Hex/go-version-update) [![GoDoc](https://godoc.org/github.com/Code-Hex/go-version-update?status.svg)](https://godoc.org/github.com/Code-Hex/go-version-update)  \nUpdate the version string of your go project.  \nRewrite the value of the `const` or `var` variables matching `/version/i` to the specified version string.\n\n# Synopsis\n\n```go\npackage main\n\nimport update \"github.com/Code-Hex/go-version-update\"\n\nfunc main() {\n\n    // Find go files are described version variables.\n    founds, err := update.GrepVersion(\"target_directory\")\n    if err != nil {\n        panic(err)\n    }\n\n    // Re write value of version variables.\n    for _, path := range founds {\n        // Re write to \"1.2.3\"\n        if err := update.NextVersion(os.Stdout, \"1.2.3\", path); err != nil {\n            panic(err)\n        }\n    }\n}\n```\n\nYou can also modify the version of your project using the `goversion` command.\n\n## goversion\n```\nUsage: goversion [options] \n  Options:\n  -h,  --help                   print usage and exit\n  -f,  --format \u003cversion\u003e       rewrite version of code\n  -d,  --dir                    target directory\n```\n\n# Installation\n- Library install\n\n        go get github.com/Code-Hex/go-version-update\n\n- `goversion` command install\n\n        go get github.com/Code-Hex/go-version-update/cmd/goversion\n\n# Contribute\nIf you find an issue with this library, please report an issue.  \nIf you'd like, we welcome any contributions. Fork this library and submit a pull request.\n\n# License\n[MIT](https://github.com/Code-Hex/go-version-update/blob/master/LICENSE)\n# Author\n[codehex](https://twitter.com/CodeHex)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hex%2Fgo-version-update","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-hex%2Fgo-version-update","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-hex%2Fgo-version-update/lists"}