Re: [go-nuts] Trying to call powershell script from Go

2020-10-28 Thread Kurtis Rader
I ran, in an interactive administrative PowerShell session, this command: Set-ExecutionPolicy -Scope CurrentUser Unrestricted After doing that I was able to successfully run your program after changing "script.ps1" to ".\\script.ps1". That is, I saw "hello" and "err" was nil. On Wed, Oct 28,

Re: [go-nuts] Trying to call powershell script from Go

2020-10-28 Thread Kurtis Rader
Have you tried running the command directly from a Windows shell prompt? That is, opening a Windows cmd or powershell session and typing this: c:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe script.ps1 When I do that, after I create a file named "script.ps1" in my CWD that contains

[go-nuts] xml easily encode iso-8859-1 charset

2020-10-28 Thread Jérôme LAFORGE
Hello Gophers, How can I encode easily struct with iso-8859-1 charset ? How can I switch easily to one charset to another? For example within this playground, I like to select specific charset. https://play.golang.org/p/4HGSO7ivoN3 Thx in adv Jérôme -- You received this message because you are

Re: [go-nuts] Trying to call powershell script from Go

2020-10-28 Thread Uzair Ally
Hi Marvin, That was the issue. I removed the quotes from cmdName and the compiler identified it as a variable instead of a string. So I updated the code, removing the quotes from cmdName and it compiled, but I'm seeing the err output now and exit status 1 instead of actual output from the comm

Re: [go-nuts] Trying to call powershell script from Go

2020-10-28 Thread Uzair Ally
Hi Jake.. sorry for the confusion.. appreciate your input! On Wednesday, October 28, 2020 at 3:00:24 PM UTC+3 jake...@gmail.com wrote: > Technically your code is not runnable, since it does not compile. I > misunderstood, and thought you were having a problem with running a > powershell script

Re: [go-nuts] Trying to call powershell script from Go

2020-10-28 Thread jake...@gmail.com
Technically your code is not runnable, since it does not compile. I misunderstood, and thought you were having a problem with running a powershell script from Go, but actually you are having a problem compiling the code. Very different problems. So never-mind ;-) On Tuesday, October 27, 2020 at

[go-nuts] net/http client about host, ip and connection?

2020-10-28 Thread xie cui
there a domain name domainA, has two ip address let's name ip1, ip2, when we use http client in golang to send a request, how it pickup ip address? it will use ip1 or ip2, what 's the stragegy? after many request send, the client must hold some connections to ip1, ip2 in connection pool, at the

Re: [go-nuts] gccgo problem compiling go from source

2020-10-28 Thread Hugo Cornelis
Hi all, I have set up a github repository with the system call bindings for powerpc that we developed over the last months. https://github.com/hcornelis/golang-sys Branch 'ppc-system-calls-v1'. I compared the system call bindings that are available from https://github.com/golang/go/issues/37443