#Go Get
69 messages ยท Page 1 of 1 (latest)
Well how would I make it inside of a "module"
Depends on what you need, but https://go.dev/doc/tutorial/create-module
That is, if making a module is what you're trying to do ๐คท
I'm trying to make a tool using discordgo, This will get loaded from a js file
Its gonna be inside of an app so it's not really a module
Yep yep, then you want to initialize a module for your app.
That's a "module" in Go parlance.
Best of luck, and feel free to ask follow up questions ๐
Maybe would like to stay here since I'm very new to go and I'm trying to learn it rn haha
As it's fast as I've decided it'll be more useful than js or py yk
Yeah, well, different tasks call for different tools. Client-side scripting for a website is not very elegant in Go ๐
I'm encorperating js, py & go it seems
๐
@naive sigil Sorry for the mention, but at the moment I don't have a website and I don't plan on uploading my code to github publicly, where would I initialize my code to
It tells me to use go mod init githubrepo.com/modulename
you can use any identifier for the module name, it's commonly a repository URL so that it integrates nicely with go get etc
but you can do go mod init foobar, and then packages within your module would be imported with import foobar/baz
Yeah, I have several things on GitHub with non-githubbed module names.
Because I'm a filthy cheater.
Did you go get them after initializing the module?
Well will this work using this go mod init evo
Yes.
module paths don't include a scheme
Sure, just use github.com/faiface/beep/mp3"
The thing is, that doesn't exist
It sure does ๐
It's not (webpage), it's a URI for a go module. The repository is github.com/faiface/beep with the package path being /mp3
yeah
so it won't load in a browser
Go is quite slow
Like it takes a while to actually run this code
I'm using cmd prompt inside of github
It also took ages to get modules
You only need to get the modules once, and go run includes a build phase. When running it for real you'd only build it once, then run the resulting binary.
Oh right
I'm not sure what here is slower than you expected?
That makes sense now
Nah, just the fact it builds
Didnt know about that part
Is this the online vscode editor from GitHub?
Is there a way I can build and just test normally?
well you wont get any more help here for a project called nitro-sniper
hahaha, yeah, I was thinking the same thing.
acc-spammer, dm-flooder, nitrro-sniper
What, so you can spam DMs?
learn go to do stuff that's worth while