I am surprised this did not come up in the thread. I'm not sure if I never knew
this was possible or I have forgotten during my time using replace. Turns out,
that you can import a folder within the same module folder as mod
identifier/package and it is automatically imported by gopls when you r
On 2/3/21 5:14 PM, Kevin Chadwick wrote:
> Why would I trust DNS
> Why would I setup letsencrypt
> What if we have a minimal internet use developer machine policy
https://roberto.selbach.ca/go-proxies
Oh, this will be annoying.
https://golang.org/ref/mod#module-proxy
A module proxy must alway
On 2/3/21 2:46 PM, David Riley wrote:
> I understand the need for the domain as part of the module namespacing, but
> it does make a certain assumption that all of these things are going to be on
> resolvable domains, which isn't true for everyone.
I have a resolvable domain and run a mail serve
On Jan 12, 2021, at 5:40 AM, Kevin Chadwick wrote:
>
> On 1/12/21 9:43 AM, Axel Wagner wrote:
>> git init
>> go mod init
>>
>> I guess you *could* safe the `git init` part, but is that really worth the
>> added
>> complexity?
>
>
> I usually init git from within vscode afterwards. I wonder i
>
>> Note, that this is essentially one of the workflows suggested here (which I
>> would consider the canonical documentation for the "eng org wants to onboard
>> Go" case):
>> https://golang.org/ref/mod#private-modules
>
> I have realised a goproxy may be needed rather than a http server as I e
> Note, that this is essentially one of the workflows suggested here (which I
> would consider the canonical documentation for the "eng org wants to onboard
> Go" case):
> https://golang.org/ref/mod#private-modules
I have realised a goproxy may be needed rather than a http server as I expect a
d
There's also this: https://github.com/golang/go/issues/37755 -- just retain
GOPATH mode
Although, now that I've been using modules more, and my various interdependent
packages are more stable, I am more sympathetic to something like #26640
instead of retaining GOPATH. Anyway, having SOME kind
Dnia 2021-01-13, o godz. 07:22:52
Rob Pike napisaĆ(a):
>Also, one must be sure to remove the replace directive before
> releasing the code, which is an easy detail to forget.
I'd humbly summon https://github.com/golang/go/issues/26640 here.
Opened at the modules advent, still it sees no love fro
>If you are using replace as part of your regular workflow, I do agree
>that
>you are probably misusing it. It's just hard to understand why, from
>what
>you said so far (barring the "I don't have an internet connection and
>want
>to use something from my module cache" case, which I find surprisi
Jim, I used replace this way just yesterday. It works fine, but is not
easily discoverable as a process and it took me a minute or two to figure
it out. Also, one must be sure to remove the replace directive before
releasing the code, which is an easy detail to forget.
The same trick (and required
I have a third use case for replace:
3. Simultaneously developing a library and client for that library. For
example, if I have a library to access a network service or piece of
hardware and want to extend its API, I find that working on the client
along with the library helps me iterate to a good
On Tue, Jan 12, 2021 at 2:49 PM Kevin Chadwick wrote:
> On 1/12/21 12:37 PM, Axel Wagner wrote:
> > Again, would be interesting how other languages can make this simpler,
> because I
> > genuinely can't imagine.
>
> The issue is that I believe go avoids files in order to speed up
> compilation.
>
On Tue, Jan 12, 2021 at 1:49 PM Kevin Chadwick wrote:
> Maybe I need to look into -mod vendor as I didn't know that existed.
> Otherwise
> disconnect your internet and then import a folder of local .go files that
> you
> use in multiple projects?
>
Ah, I see. I agree that this could be simpler.
On 1/12/21 12:37 PM, Axel Wagner wrote:
> Again, would be interesting how other languages can make this simpler,
> because I
> genuinely can't imagine.
The issue is that I believe go avoids files in order to speed up compilation.
Which I am thankful for. It's just I don't believe the replace dire
On 1/12/21 12:33 PM, Axel Wagner wrote:
> You also talk about onboarding - but I don't understand how the rest of your
> message relates to that. The replace-directive is an advanced feature that
> newcomers to the language don't need to be concerned with, as far as I can
> tell.
> It's really onl
On Tue, Jan 12, 2021 at 1:20 PM Kevin Chadwick wrote:
> I guess it's the
>
> Call code in an external package
> "https://golang.org/doc/tutorial/getting-started";
>
> That is a little hairy.
>
What is hairy about this? To me, that seems like pretty simple steps:
1. Find the library you need and
Hi,
I'm having trouble understanding and separating your core problems and what
you are suggesting to solve them.
The solution to describe, sounds to me a lot like what `-mod vendor`
achieves. I don't use that very often, so I don't really understand its
shortcomings - so it might be helpful if y
On 1/12/21 9:39 AM, Artur Vianna wrote:
> I don't think this tweet is very true, it took me many months of learning Go
> to
> start learning about go.mod. I think that's not the first thing one learns
> about
> a language, you can just 'vim main.go' and begin experimenting.
>
Fair enough. I had
On 1/12/21 9:43 AM, Axel Wagner wrote:
> git init
> go mod init
>
> I guess you *could* safe the `git init` part, but is that really worth the
> added
> complexity?
Sorry I meant replace keyword, not require in the original mail. Though
requiring a domain name is equally unintuitive.
I guess
On Tue, Jan 12, 2021 at 10:26 AM Kevin Chadwick wrote:
> Inspired by:
>
> "https://twitter.com/rakyll/status/1348723364894961666";
>
> "Yet another couple of hours spent on go.mod and go.sum. If I was giving
> #golang
> a first try today, I'd just give up and look for another option. What are
> w
I don't think this tweet is very true, it took me many months of learning
Go to start learning about go.mod. I think that's not the first thing one
learns about a language, you can just 'vim main.go' and begin experimenting.
How do you propose this tool will work?
On Tue, 12 Jan 2021, 06:25 Kevin
21 matches
Mail list logo