Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #5769

Closed
Open
Created Dec 05, 2013 by Administrator@rootOwner

gitlab & golang's "go get" (or default to .git repo extension)

Created by: smithwinston

Trying to use gitlab with golang. Let's say I have a repository as follows:

[email protected]:myuser/mygorepo

In my .go file, I can import it with:

import "example.org/myuser/mygorepo"

And I can fetch the dependency at the command line with:

go get example.org/myuser/mygorepo

The golang folks have put some work into this to make it work with github, code.google.com etc. but it doesn't quite work with gitlab.

In gitlab, since the repositories always end in .git, I must specify .git at the end of the repository name to make it work, for example:

import "example.org/myuser/mygorepo.git"

And:

go get example.org/myuser/mygorepo.git

Looks like github solves this by appending ".git" if necessary. I realize this isn't a huge problem, but it looks much nicer not to have to append ".git" to my import statements.

Any way to do the same with gitlab?

Assignee
Assign to
Time tracking