Live data from Hacker News

Go Modules Cheat Sheet

encore.dev

51–52 of 52 posts

Re: Go Modules Cheat Sheet

#51

Earlier quoted context omitted.

At least for Gitlab, you can write a .netrc in the user‘s home dir like so: machine (e.g. gitlab.com) login password For the access token, you can also leverage Gitlab‘s CI Job Token. What we do is an „echo $(netrc contents with $CI_JOB_TOKEN) > ~/.netrc“ in the pre-script in CI. ( https://stackoverflow.com/a/61257782 and https://docs.gitlab.com/ee/security/token_overview.html )

If you do take this approach, writing your access token in plaintext into a well-known file in your home directory seems like a strictly worse idea than the (also more broadly-compatible) Git insteadof rule to pull via SSH and your local agent.

Yes, though it should be noted that the access token is only valid for the duration of the Job.

Re: Go Modules Cheat Sheet

#52

i have also written an article given my frustration in finding simple information on the topic ie. how to upgrade go deps[0] which is not immediately easy to find from the extensive Go wiki[1] and a general go mod how-tos tutorial[2] [0] https://golang.cafe/blog/how-to-upgrade-golang-dependencies.... [1] https://github.com/golang/go/wiki/Modules#how-to-upgrade-and... [2] https://www.youtube.com/watch?v=AJxKKmzRTUY

Why did you decide not contributing to the wiki? (curious, not blaming tone)

the wiki already have enough information - it is in my opinion structured and packed in a way that is difficult to find. I think if it would be possible to split the Modules wiki into multiple search-engine-indexable files - info will be slightly easier to find
Post reply on HN