Golang imports path shortening using private Azure devops

Viewed 20

I have a private repository on azure. I had a difficult time understanding the setup so I can use the different sections of my code - but I got it I think. But I am left with something that I don't like - the length of my import paths seems like a lot to type. Is there a solution I can use to shorten them? Did I get the configuration right?

here is my setup (Subscripify is my org name)

GOPPRIVATE=dev.azure.com

I have a ..gitconfig like so

[url "git@ssh.dev.azure.com:v3/subscripify/"]
  insteadOf = https://dev.azure.com/subscripify/

I am working in a project named subscripify-prod on a repo named tenant-mgmt-ss. I have a main package and another package within my repo named tenant.

My imports look like this one

"dev.azure.com/Subscripify/subscripify-prod/_git/tenant-mgmt-ss/tenant"

they are really long IMO. coming from javascript all I'd have to do is import like this import tenant from './tenant'

0 Answers
Related