Re: [go-nuts] How to run a java file using go script.

2022-08-03 Thread Jan Mercl
On Thu, Aug 4, 2022 at 6:24 AM TECHAX wrote: > I tried the following one but still, it's not working. > > os.Setenv("PATH","/home/sdk/jdk-11.0.16/bin") > cmd,_:=exec.Command("java","-version").Output() > fmt.Println(string(cmd)) > > Since the path is set, so it should display the java version, ri

Re: [go-nuts] How to run a java file using go script.

2022-08-03 Thread TECHAX
I tried the following one but still, it's not working. *os.Setenv("PATH","/home/sdk/jdk-11.0.16/bin")* *cmd,_:=exec.Command("java","-version").Output()* *fmt.Println(string(cmd))* Since the path is set, so it should display the java version, right? On Thu, Aug 4, 2022 at 1:45 AM Kurtis Rader wr

[go-nuts] Discussion: standard iterator interface proposal

2022-08-03 Thread Ian Lance Taylor
I've just opened a discussion for a standard iterator interface. This is intended to describe a framework that future generic containers will implement. If you are interested in this topic, please see https://go.dev/issue/54245. We welcome all comments, but please be aware that this is an area t

[go-nuts] Re: Video manipulation library

2022-08-03 Thread MithunS
Have you looked at this ? https://github.com/avelino/awesome-go#video On Wednesday, August 3, 2022 at 2:22:02 PM UTC-7 yous...@gmail.com wrote: > Hi gophers, > I'm building an application that involves video manipulations and I would > like to know some great Go libraries for doing that. > --

[go-nuts] Video manipulation library

2022-08-03 Thread Mohammed Yussif
Hi gophers, I'm building an application that involves video manipulations and I would like to know some great Go libraries for doing that. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails f

Re: [go-nuts] How to run a java file using go script.

2022-08-03 Thread Kurtis Rader
On Wed, Aug 3, 2022 at 11:38 AM TECHAX wrote: > I tried this for setting Java, but not working. > > CMD:= exec.Command("bash","-c","export PATH=/home/user/jdk8/bin") > > Can you please help me with this? > That statement starts a new bash process which modifies its environment and exits, thus th

Re: [go-nuts] How to run a java file using go script.

2022-08-03 Thread TECHAX
I tried this for setting Java, but not working. CMD:= exec.Command("bash","-c","export PATH=/home/user/jdk8/bin") Can you please help me with this? On Wed, 3 Aug, 2022, 7:48 pm Eli Bendersky, wrote: > You should be able to use the os/exec package (https://pkg.go.dev/os/exec) > to invoke exter

Re: [go-nuts] returning struct vs. returning interface

2022-08-03 Thread 'Axel Wagner' via golang-nuts
git blame points at https://github.com/golang/go/commit/72b501cb0326f62a20621636942e5a95fc3c1466 https://github.com/golang/go/issues/26535 That is: Originally, the type returned by NewReader was unexported, so an interface was used. Then, methods where added to that type which would be useful to be

[go-nuts] returning struct vs. returning interface

2022-08-03 Thread Jochen Voss
Dear all, Why does the function NewReader [1] in compress/lzw return an io.ReadCloser instead of an *lzw.Reader? The docs say "It is guaranteed that the underlying type of the returned io.ReadCloser is a *Reader", so why not return a *Reader without wrapping? [1] https://pkg.go.dev/compress/l

Re: [go-nuts] How to run a java file using go script.

2022-08-03 Thread Eli Bendersky
You should be able to use the os/exec package (https://pkg.go.dev/os/exec) to invoke external programs from Go. On Wed, Aug 3, 2022 at 5:45 AM PK wrote: > Hi everyone, > I am new to golang. I was writing a script, with which I want to run a > java program. > Can anyone please let me know how to

[go-nuts] How to run a java file using go script.

2022-08-03 Thread PK
Hi everyone, I am new to golang. I was writing a script, with which I want to run a java program. Can anyone please let me know how to run java file using go scripts. Thanks -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from t

Re: [go-nuts] Is there any way to force Go to call asm function using register-based arguments?

2022-08-03 Thread Jakob Thomsen
Hi all! Thanks for the pointer to using in the code. Unfortunately, it seems that it is only allowed for runtime* packages, as I get a ABI selector only permitted when compiling runtime, reference was to "\"\".__CompareNMask" error, when using it. I'm trying to use it for this simple function

[go-nuts] Re: Small language change for additional type safety (Go2?)

2022-08-03 Thread Marcello H
I would vote against it. The thing is, if you try to cover this for a mistake, then we can cover every mistake, right? There is probably a linter which can check this, or you can write a linter yourself. (Also, if you happed to make this mistake more than once, tell your fellow developers, that

Re: [go-nuts] Is this algorithm viable? its faster than AES256 upto 50KB

2022-08-03 Thread Uli Kunitz
The algorithm would only be viable if you you would use a different secret for every password. If the secret is reused, it can be broken with a single known-plaintext attack. The recommendation is always don't do your own crypto. Use PBKDF2, SHA256-CRYPT or Argon2 for password verification. On W