Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • heptapod heptapod
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 157
    • Issues 157
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • heptapod
  • heptapodheptapod
  • Issues
  • #164

Closed
Open
Created Jan 17, 2020 by Christophe de Vienne@cdevienne

Support golang imports

Description

In the golang realm, "get get" is the tool that fetch the sources of a module given its import path. Putting aside the custom import paths (a.k.a. vanity imports), the path is generally the url of the vcs repository.

For example, getting the 'minio-go' library is done by running the following command:

"go get github.com/minio/minio-go"

Because "go get" knows github.com hosts git repositories, it has no problem choosing a vcs tool.

On heptapod however it doesn't do a good job detecting mercurial repositories, and "go get forge.orus.io/xbus/go-xbus" will fail because it expects a git repository.

Proposal

The simplest solution I can think of is to add the go imports metadata in the projects that defines "Go" as their main language (by adding a 'golang' tag for example).

For go-xbus, these meta would be:

<meta name="go-import" content="forge.orus.io/xbus/go-xbus hg https://forge.orus.io/xbus/go-xbus">
<meta name="go-source" content="forge.orus.io/xbus/go-xbus https://forge.orus.io/xbus/go-xbus https://forge.orus.io/xbus/go-xbus/tree/branch/default/{/dir} https://forge.orus.io/xbus/go-xbus/blob/branch/default/{/dir}/{file}#L{line}">

Links / references

  • documentation on import paths, including the metadata format: https://godoc.org/cmd/go#hdr-Remote_import_paths
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking