{"id":16122056,"url":"https://github.com/foxcapades/gversion","last_synced_at":"2025-04-06T11:41:10.511Z","repository":{"id":57557414,"uuid":"320459809","full_name":"Foxcapades/gVersion","owner":"Foxcapades","description":"Version parsing","archived":false,"fork":false,"pushed_at":"2020-12-11T03:55:25.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-12T17:19:21.385Z","etag":null,"topics":[],"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/Foxcapades.png","metadata":{"files":{"readme":"readme.adoc","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":"2020-12-11T03:45:32.000Z","updated_at":"2020-12-11T03:55:19.000Z","dependencies_parsed_at":"2022-09-15T19:00:47.860Z","dependency_job_id":null,"html_url":"https://github.com/Foxcapades/gVersion","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2FgVersion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2FgVersion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2FgVersion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Foxcapades%2FgVersion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Foxcapades","download_url":"https://codeload.github.com/Foxcapades/gVersion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478234,"owners_count":20945262,"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-09T21:09:15.800Z","updated_at":"2025-04-06T11:41:10.487Z","avatar_url":"https://github.com/Foxcapades.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"= gVersion\n\nimage:https://img.shields.io/github/v/tag/foxcapades/gVersion[GitHub tag (latest SemVer)]\nimage:https://img.shields.io/github/go-mod/go-version/foxcapades/gVersion[GitHub go.mod Go version]\nimage:https://img.shields.io/github/license/foxcapades/gVersion[GitHub]\nimage:https://img.shields.io/badge/api-docs-ff69b4[title=\"API Docs\", link=https://pkg.go.dev/github.com/foxcapades/gVersion/v1/pkg/semver]\nimage:https://github.com/Foxcapades/gVersion/workflows/Go/badge.svg[Go]\nimage:https://codecov.io/gh/Foxcapades/gVersion/branch/main/graph/badge.svg?token=E4WD9IURJL[title=codecov, link=https://codecov.io/gh/Foxcapades/gVersion]\n\n\nA simple version string representation/parser for dealing with version strings\nas their individual components.\n\nAdditionally, this library imports no stdlib packages apart from `unsafe`.\n\n.Example\n[source, go]\n----\nfunc ExampleParse() {\n\tversion := \"v1.23.0-alpha+b58\"\n\n\tver, _ := semver.Parse(version)\n\n\tfmt.Println(ver.Major)\n\tfmt.Println(ver.Minor)\n\tfmt.Println(ver.Patch)\n\tfmt.Println(ver.Prerelease)\n\tfmt.Println(ver.Build)\n\n\t// Output:\n\t// 1\n\t// 23\n\t// 0\n\t// [alpha]\n\t// [b58]\n}\n----\n\nVersion types are comparable using the methods `Equal`, `Equivalent`,\n`IsBefore`, and `IsAfter`.\n\n*_Equal vs Equivalent_*\n\nThe `Equal` method compares all components of 2 Version structs, including the\nprerelease and build tags.\n\nThe `Equivalent` method compares 2 Version structs following the semantic\nversioning rule that gives `1.0.0` and `1.0.0+b23` the same precedence in\nversion ordering.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcapades%2Fgversion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxcapades%2Fgversion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxcapades%2Fgversion/lists"}