[go-nuts] How can I break out of a goroutine if a condition is met?
I am wanting to try and login to mutiple servers at once (bruteforce) now I am spawning a new goroutine for each set of credentials. I want to be able to break out of my loop that I have once a successful login is met, as of right now the program just throws a panic and I am unsure of what I can do. -- 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/945bb1b6-9dfc-41b1-b944-971fb8d6a21an%40googlegroups.com.
Re: [go-nuts] Why can I not install external packages?
There we go! It is now working thanks alot guys. On Tuesday, April 13, 2021 at 10:57:22 AM UTC+1 Jan Mercl wrote: > On Tue, Apr 13, 2021 at 11:40 AM Tenjin wrote: > > > So I am using WSL2 to develop using golang but for some reason I am > unable to use other peoples packages. > > For example: I am wanting to use the sql driver > https://github.com/go-sql-driver/mysql I am able to go get it and it says > it is downloading then it downloads but when I go to use it in my project > it just says there is no go mod file, so I was going to use that to manage > packages but when I run "go init" it just says initializing git repo and > then does not create a go mod file. > > I do not mind which way I have to use to get the driver working I just > need to get it working. One more thing, I cannot install any packages its > not just the sql driver. > > In your module directory: > > $ go mod init example.com/foo/bar > $ go mod tidy > $ GO111MODULE=on go build -v -x > > The last line just verifies if it works and should possibly reveal why, if > not. > > > Here is my gopath: /home//go > > In your setup the value of $GOPATH should not matter. > -- 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/04f69743-8cfa-4e05-bd9d-eeb284d412e0n%40googlegroups.com.
[go-nuts] Why can I not install external packages?
So I am using WSL2 to develop using golang but for some reason I am unable to use other peoples packages. For example: I am wanting to use the sql driver https://github.com/go-sql-driver/mysql I am able to go get it and it says it is downloading then it downloads but when I go to use it in my project it just says there is no go mod file, so I was going to use that to manage packages but when I run "go init" it just says initializing git repo and then does not create a go mod file. I do not mind which way I have to use to get the driver working I just need to get it working. One more thing, I cannot install any packages its not just the sql driver. Here is my gopath: /home//go -- 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/6fc5372b-9c98-4a81-b11a-95ad50e32d69n%40googlegroups.com.
[go-nuts] Why does my code keep giving me "socket: too many open files"
Basically I am making a script to query an api for some json data, if I run it synchronously it works fine and works as intended but it needs to do this give or take 15thousand times so I thought I would use concurrency to get the job done. It works fine for about 4 thousand queries then it stops working and gives me this error "socket: too many open files" when I did research on the issue I implemented everything they did I am consuming the response body and then I am closing it once I am finished as well as letting my wait group know I am finished to exit the go routine. Right now I am making a new goroutine for each request and then closing it. I am also using WSL2 to run the code as I came across a stack overflow post that said I need to up my ulimit on the machine which I cannot do and ideally do not want others to have to do. I have been stuck on this for a few days now and no one is helping me thus far, fingers crossed this post works out well and I can get it resolved. -- 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/09e4caf4-d79c-450e-a544-2d9242167f87n%40googlegroups.com.