Shields: Badge Request: Go (golang) module version from GitHub

Created on 8 Sep 2019  路  7Comments  路  Source: badges/shields

:clipboard: Description

  • Which service is this badge for: GitHub
  • What sort of information should this badge show?
    Go | v1.13

:link: Data

  • go.mod (Eg: https://github.com/JulienBreux/baleia/blob/master/go.mod#L3)

:microphone: Motivation

I love Go, I love Shield.io 馃槈

馃憖 Example

Example

good first issue hacktoberfest service-badge

Most helpful comment

I'll work on it later today.

All 7 comments

For anyone interested in implementing this, you may want to take a look at the similar service that provides the version of an npm package from the package.json file in a GitHub repo

https://github.com/badges/shields/blob/master/services/github/github-package-json.service.js

https://github.com/badges/shields/issues/2259 contains some related conversation that may be useful as well

I'll work on it later today.

I see @pedrofracassi you didn't make it. If you don't mind I will look into it.

@hjagodzinski please do.

In my admittedly limited experience with Go, I've always found the mod file to be in the root of the repo. Is that something that's enforced/required, or would be it possible for someone to have the mod file in a subdirectory of the repo?

For example:

/foo/bar/go.mod
/foo/baz/go.mod

Only if it's a monorepo with multiple go packages, I believe. Maybe let people add the path to the badge URL?

Thanks @pedrofracassi - that's exactly what I was thinking

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stclairdaniel picture stclairdaniel  路  3Comments

kerolloz picture kerolloz  路  3Comments

techtonik picture techtonik  路  3Comments

niccokunzmann picture niccokunzmann  路  3Comments

najeeb-ur-rehman picture najeeb-ur-rehman  路  3Comments