Re: [go-nuts] Executing JAR from Go

2024-04-16 Thread Roland Müller
That my point too. Am Dienstag, 16. April 2024 schrieb Kurtis Rader : > On Mon, Apr 15, 2024 at 10:34 PM Roland Müller wrote: >> >> The class should be written as org.Sign instead of org/Sign. > > Agreed. My point was that the O.P. wrote "org/Sign" in their Go

Re: [go-nuts] Executing JAR from Go

2024-04-15 Thread Roland Müller
The class should be written as org.Sign instead of org/Sign. Am Dienstag, 16. April 2024 schrieb Kurtis Rader : > On Mon, Apr 15, 2024 at 4:02 AM Shivli Srivastava wrote: >> >> When I run the command on my terminal , everything works as fine but running it using exec.Command gives Error: Could

Re: [go-nuts] the environment variable GOROOT doesn't load for work with go

2023-10-06 Thread Roland Müller
Hello, the path of the go.exe binary is quite suspicious. C:\Windows is the windows system folder and system32 - as far as I know - contains some partly legacy stuff. Valid locatios for programs are "C:\Program Files" or "C:\Program Files(32)" (out of my memory - since I am sitting in front

Re: [go-nuts] Offline version of A Tour of Go

2023-09-26 Thread Roland Müller
The tour can be locally installed. https://pkg.go.dev/golang.org/x/website/tour#section-readme go get golang.org/x/tour In the tour/ directory go run . Then local Tour of Go is here: http://localhost:3999/ Am Dienstag, 26. September 2023 schrieb 王富民awaw : > Hi Friends of Go > Is there an

Re: [go-nuts] Re: Why doesn't the database/sql package in Go support using placeholders "?" to replace the database name and username in SQL statements?

2023-09-20 Thread Roland Müller
Even standard SQL does not support using bind variables for everything that uses SQL syntax and does not belong to DML (=data manipulation language) Am Montag, 18. September 2023 schrieb Vladimir Varankin : > A thing, that it may be valuable to explain further, is that Go's "database/sql" doesn't

Re: [go-nuts] Export fs.FS as FUSE fs

2023-06-29 Thread Roland Müller
Hello, I am struggling to understand the purpose of extension. FS is an interface to access file systems from go code. Is your new extension acting as a handler and allows to expose any Go FS to be mounted and acessed at operating system level?

Re: [go-nuts] Variable Declaration inside infinite loop

2023-01-26 Thread Roland Müller
Am Mittwoch, 25. Januar 2023 schrieb 'Jakob Borg' via golang-nuts < golang-nuts@googlegroups.com>: > On 25 Jan 2023, at 12:26, Shashwat wrote: >> >> Is it safe to declare a variable inside an infinite loop ? >> >> for { >> a := 0 >> a += 1 >> } >> >> Won't this cause memory allocation in

Re: [go-nuts] Occasional hard lockup w/ 100% CPU usage in go applications

2022-11-01 Thread Roland Müller
Hello, Am Dienstag, 1. November 2022 schrieb Robert Engels : > Also, enabling and generating core dumps is somewhat OS version specific - even between Linux versions - so you probably need to check your docs. > dumping core files is a kernel feature, but I think most Linux distros have it

Re: [go-nuts] Shared Goruntime across different microservices written in GO

2022-09-28 Thread Roland Müller
Microservices are located in containers and making these services to use a common binary would break the basic idea of microservices. Every service is a separate unit that shares only the absolute necessary things for collaboration with other services rather than its implementation. BR, Roland

Re: [go-nuts] How to send bytes of data to struct

2022-09-28 Thread Roland Müller
Following tutorial about usage of encoding/json should address your question. https://tutorialedge.net/golang/parsing-json-with-golang/ BR, Roland Am Sonntag, 25. September 2022 schrieb Vishnu B : > I am new to golang, I have a function that receives the JSON data as bytes(data variable) I want

Re: [go-nuts] custom linux shell that can run bash shell

2022-06-04 Thread Roland Müller
Hello, Am Freitag, 3. Juni 2022 schrieb Harsh Rathore : > Hello everyone, > so I am trying to make a custom linux shell in golang, among other things, I want this shell to be able to run BASH shell. > Like when we are prompted with sh shell > $ Of course it is feasable to make a Golang remake of

Re: [go-nuts] Golang and virustotal

2022-05-11 Thread Roland Müller
Hello, Am Mi., 11. Mai 2022 um 13:44 Uhr schrieb Klaus Post : > Hi! > > You can try 'garble' and see if that helps: > https://github.com/burrowers/garble > > For me, it seems to reduce the number of false positives, but there are > still some left. > > /Klaus > Just a silly question: is the

Re: [go-nuts] Golang application local timezone doesn't change with the system timezone

2022-03-02 Thread Roland Müller
Hello, Am Mi., 2. März 2022 um 09:48 Uhr schrieb Brian Candler : > On Tuesday, 1 March 2022 at 22:54:35 UTC carl...@gmail.com wrote: > >> If I had running services written in Go, they would not be aware of the >> timezone change. >> > > I think the current behaviour is reasonable, because it's

Re: [go-nuts] go mod tidy stop when downloading

2022-02-24 Thread Roland Müller
Hello, On 2/24/22 08:20, Rijal Asep Nugroho wrote: i am run go mod tidy, and always stop when downloading kafka-go. is the kafka-go library the problem? or how to find out what's going on? is there an option to view log information or something? thanks. May be these two flags are helpful for

Re: [go-nuts] fmt.Sscanf strange behaviour

2022-01-25 Thread Roland Müller
The tool you are looking for is most probably the regex module: https://pkg.go.dev/regexp BR Roland Am Mittwoch, 26. Januar 2022 schrieb Victor Giordano : > Thanks for the insight again. It is appreciated. > Till next time. > V > El mar, 25 ene 2022 a las 18:05, Ian Lance Taylor () escribió: >>

Re: [go-nuts] Re: golang-announce is blocked in Google Groups?

2022-01-21 Thread Roland Müller
Same applies for me. Most of mail for this group would be moved to 'Spam'. Only a custom rule prevents that to take place. Am Fr., 21. Jan. 2022 um 20:31 Uhr schrieb Bruno Albuquerque : > FWIIW, the same happens here. When creating a filter (assuming one is > using GMail) you can tell it to

Re: [go-nuts] Fatal error : on running go vet cmd

2022-01-13 Thread Roland Müller
Hello Am Mi., 12. Jan. 2022 um 23:19 Uhr schrieb Ian Lance Taylor : > On Wed, Jan 12, 2022 at 1:17 PM Tejas Gowda > wrote: > > > > I am using linux enviorment, installed go 1.6 > In Fedora 34 there must be glibc-headers-x86 installed to get C headers. However, if gcc is installed by package

Re: [go-nuts] Do pointer receiver methods need to be checked for nil?

2021-11-25 Thread Roland Müller
Definitely yes. I just sent a message in another thread in this discussion group BR, Roland Quoting myself: Obviously, even just calling a "methods" of some struct instance that is not initialized succeeds in Go. A panic occurs only when the program tries to derefer nil pointer: 'func (ev

Re: [go-nuts] some incorrect code in blog.

2021-11-25 Thread Roland Müller
meant, did you test it with a bad path, and with the defer before the > error check? I believe you implied that this didn't result in a failure. > It would have happened on exit from the method, if anything. > > On Thu, Nov 25, 2021 at 12:49 PM Roland Müller wrote: > >> Yes. Actuall

Re: [go-nuts] some incorrect code in blog.

2021-11-25 Thread Roland Müller
f) if err != nil { fmt.Println("NO FILE") //return } defer f.Close() fmt.Println("END") } Am Do., 25. Nov. 2021 um 21:43 Uhr schrieb David Karr < davidmichaelk...@gmail.com>: > And did you test that with a file path that would fail? > > On Th

Re: [go-nuts] some incorrect code in blog.

2021-11-25 Thread Roland Müller
Hello, actually trying this with os.Open() the program behaves the same regardless whether the defer is before or after the error handling, Thus, no panic :-) Isn't anything declared with defer always running after the user code in the given func ends? I am too tired now to look this up.

Re: [go-nuts] cgo error I don't understand

2021-11-04 Thread Roland Müller
Hello, the entry in the path for mingwin is wrong: it should be either start with C:\ or another drive letter or in case it's an absolute path with double backslash. Br Roland Am Freitag, 5. November 2021 schrieb Robert Solomon : > The full error is: > # github.com/go-gl/glfw/v3.3/glfw > cgo:

Re: [go-nuts] smtp.SendMail not using the from argument

2021-09-09 Thread Roland Müller
Hello, Am Do., 9. Sept. 2021 um 20:19 Uhr schrieb Dean Schulze < dean.w.schu...@gmail.com>: > I'm sending emails with smtp.SendMail() via gmail. I set the from > argument to smtp.SendMail() to a different email address than my gmail > username, but the emails still get sent with the From: as my

Re: [go-nuts] Makefiles for Go Programs

2021-09-02 Thread Roland Müller
Hello, A big thank you to everybody who contributed to this thread! I guess it will take some time to process the things learned from this discussion. BR, Roland Am Mi., 25. Aug. 2021 um 12:28 Uhr schrieb Stephen Illingworth < stephen.illingwo...@gmail.com>: > I use Makefiles with Go

Re: [go-nuts] Re: Makefiles for Go Programs

2021-08-23 Thread Roland Müller
Am Mo., 23. Aug. 2021 um 18:48 Uhr schrieb jake...@gmail.com < jake6...@gmail.com>: > On Sunday, August 22, 2021 at 11:11:23 PM UTC-4 jlfo...@berkeley.edu > wrote: > >> >> I've noticed that few, if any, Go programs use Makefiles. Is that because >> the overhead of using make is greater than the

Re: [go-nuts] Re: Whats wrong with my channel

2021-08-19 Thread Roland Müller
Here is a sleepless version. The channel is still unbuffered, but this should be OK since reading from channel is done in main(). Thus, factorial() writes the result to the channel, and main() reads it from there. As result main() does not end before factorial() is completed.

Re: [go-nuts] Re: How to retrieve content of file uploaded using "curl --upload-file ..." way in Go HttpServer

2021-08-16 Thread Roland Müller
Hello, Am Mo., 16. Aug. 2021 um 19:11 Uhr schrieb Kannan S : > messageId := r.URL.Query()["id"][0] > out, err := os.Create("./upload/" + messageId + ".mp3") > > in your original example file name is retrieved from the request.URL.Path rather than from an variable named 'id' using

Re: [go-nuts] Re: Upgrade to Go1.16 from Go1.14 broke my query

2021-06-26 Thread Roland Müller
When the query works with other DBs & their Go drivers this strongly suggest that there is some incompatibility of the Firebird vs. Go 16.x. Thus you should check the suggestion from Jake to update the Firebird driver for Go. In the Github project

Re: [go-nuts] Upgrade to Go1.16 from Go1.14 broke my query

2021-06-25 Thread Roland Müller
Hello, Am Do., 24. Juni 2021 um 18:14 Uhr schrieb Hugh Myrie : > I recently updated my Go version to 1.16 and for all my queries I now get > an error: > > {"error":"Dynamic SQL Error\nSQL error code = -303\narithmetic exception, > numeric overflow, or string truncation\nstring right

Re: [go-nuts] Understanding how []byte("astring") works

2021-06-13 Thread Roland Müller
Hello, Am Mo., 14. Juni 2021 um 03:24 Uhr schrieb Amit Saha : > Hi - My main motivation to understand this is i always had to google > this - how to convert a string to a byte slice. > > Is []byte a type that has been defined in the compiler? > > Or, is that an internal level detail that an

Re: [go-nuts] gonum plot : font error

2021-05-18 Thread Roland Müller
Hello, applying Carlas's solution I got a failure in line 20 since plot.New() returns a pointer but no pointer, error pair. Only after changing usage of New() I got the scatter-demo running. May be error message can be enhanced :-) scatter-demo]$ go build # scatter-demo ./main.go:20:9:

Re: [go-nuts] json objects

2021-01-01 Thread Roland Müller
To have a JSon format with lower-case field names one has to (1) use field names beginning with upper case - to enable export and (2) use json annotations to force a field name. Just have a look at the following example: https://gobyexample.com/json Am Sa., 26.

Re: [go-nuts] Positional arguments and flag package

2020-10-15 Thread Roland Müller
I guess it's usage of flag is meant in to behave like parsing flags in Unix/LInux, or Python' argparse: - after the command you have the flags denoted by '-' - after flags follow rest of command line args where elements can be every character string BR, Roland Am Fr., 9. Okt. 2020 um

Re: [go-nuts] Positional arguments and flag package

2020-10-15 Thread Roland Müller
Actually, it's explicitly documented, so I don't have to guess: https://golang.org/pkg/flag/#hdr-Command_line_flag_syntax Am Do., 15. Okt. 2020 um 08:22 Uhr schrieb Roland Müller : > I guess it's usage of flag is meant in to behave like parsing flags in > Unix/LInux, or Python' ar