{"id":44288353,"url":"https://github.com/jnovack/go-version","last_synced_at":"2026-02-10T23:07:56.588Z","repository":{"id":79166912,"uuid":"152968714","full_name":"jnovack/go-version","owner":"jnovack","description":"Package to easily version your application","archived":false,"fork":false,"pushed_at":"2022-08-10T11:19:45.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T17:53:56.584Z","etag":null,"topics":["bad-idea","deprecated","wrong-way"],"latest_commit_sha":null,"homepage":null,"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/jnovack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"jnovack"}},"created_at":"2018-10-14T11:55:02.000Z","updated_at":"2022-08-10T11:19:48.000Z","dependencies_parsed_at":"2023-05-18T14:01:08.171Z","dependency_job_id":null,"html_url":"https://github.com/jnovack/go-version","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jnovack/go-version","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnovack%2Fgo-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnovack%2Fgo-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnovack%2Fgo-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnovack%2Fgo-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jnovack","download_url":"https://codeload.github.com/jnovack/go-version/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnovack%2Fgo-version/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29321277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T20:44:44.282Z","status":"ssl_error","status_checked_at":"2026-02-10T20:44:43.393Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bad-idea","deprecated","wrong-way"],"created_at":"2026-02-10T23:07:56.440Z","updated_at":"2026-02-10T23:07:56.575Z","avatar_url":"https://github.com/jnovack.png","language":"Go","funding_links":["https://patreon.com/jnovack"],"categories":[],"sub_categories":[],"readme":"# go-version\n\n## Introduction\n\nIn all of my programs, I like to have a pretty little line at the top stating\nsome key facts about the programs compile.\n\nExample:\n\n```\ncloudkey version v1.0.0-rc2 git revision fe3428954dfd97d850ca687badcace28102e351d go version go1.12\n```\n\nI was tiring of writing this over, and over, and over again, so I just made a\npackage.\n\n## Usage\n\nAt the top of `main.go`\n\n```\nimport (\n\t_ \"github.com/jnovack/go-version\"\n)\n```\n\nThen, when you build, add these variables to the command line:\n\n```\nAPPLICATION=$(shell basename `pwd`)\nBUILD_RFC3339=$(shell date -u +\"%Y-%m-%dT%H:%M:%S+00:00\")\nCOMMIT=$(shell git rev-parse HEAD)\nVERSION=$(shell git describe --tags)\nGO_LDFLAGS=\"-w -s \\\n    -X github.com/jnovack/go-version.Application=${APPLICATION} \\\n    -X github.com/jnovack/go-version.BuildDate=${BUILD_RFC3339} \\\n\t-X github.com/jnovack/go-version.Revision=${COMMIT} \\\n\t-X github.com/jnovack/go-version.Version=${VERSION}\n\t\"\n\ngo build -ldflags \"GO_LDFLAGS\" main.go\n```\n\nor use a `Makefile` and do not be a scrub.\n\n## Variables\n\nAll the variables are exported, so you can reference them within your code.\n\n```\nvar (\n\t// Application supplied by the linker\n\tApplication = \"go-application\"\n\t// BuildRFC3339 supplied by the linker\n\tBuildRFC3339 = \"1970-01-01T00:00:00+00:00\"\n\t// Version supplied by the linker\n\tVersion = \"v0.0.0\"\n\t// Commit supplied by the linker\n\tCommit = \"00000000\"\n\t// GoVersion supplied by the runtime\n\tGoVersion = runtime.Version()\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnovack%2Fgo-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjnovack%2Fgo-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnovack%2Fgo-version/lists"}