I was unclear.
My directories are structured so that each is its own program. For
example, I have programs w/ these names, and the code is in that
directory. That's how I understood GOPATH was supposed to be organized
~/go/src/dsrt
~/go/src/regex
~/go/src/comparehashes
There are at least 20 of these. I have compiled these from within
~/go/src using
go install dsrt
go install regex
and so on
Additionally, I would like more explanation and/or documentation as to
the replace command in a go.mod file.
I'm also curious as to WHY GOPATH is being removed. That would
immediately make obsolete books like "The Go Programming Language" by
Alan Donovan and Brian Kerninghan, because none of their code would
compile as is.
However, it does provide opportunities for people to write more books
--rob solomon
On 2/23/21 9:32 PM, Amit Saha wrote:
On Wed, Feb 24, 2021 at 12:49 PM rob <drrob...@gmail.com> wrote:
Hi. I'm a hobby programmer. I've been able to learn and use gopath
mode for a while. I've accumulated 20+ programs that I use that were
build using gopath mode. I'm not using a package manager, as all my
code is in GOPATH, ie, ~/go/src/
I don't understand how to convert this to modules. I've read the blogs
on golang.org/ref/mod# ... , and still don't understand how to convert
to modules.
I tried a year or so ago, but I then could not compile anything, so I
nuked whatever I did and reverted to GOPATH.
I'm looking for a conversion guide for the complete idiot, or for
dummies if that's preferable.
I'd be satisfied if there was a step by step guide for converting
~/go/src/hello.go to modules. I could probably adapt that.
Right now, all documentation I've seen starts by doing git clone
https://github.com/my-own-code. And then I'm lost.
If this is not the correct forum to post this very basic request for
help, guidance as to where else I should GO would be helpful.
What is your current Go version?
You mention:
~/go/src/hello.go
Is that the exact path or do you have ~/go/src/<some-dir>/hello.go?
When you say you have 20+ programs that I use that were build using
gopath mode, how is the source structure exactly on your system?
--rob solomon
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/24b2ccb9-f4f5-83b0-6a1b-6774021ce029%40gmail.com.
--
Software Engineer, Author
https://echorand.me
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/0f367083-38c8-c536-b28b-9378ba194c8e%40fastmail.com.