Re: [go-nuts] help

2024-02-18 Thread 'Brian Candler' via golang-nuts
Your code includes this line: log.Println("DATABASE_URL:", os.Getenv("DATABASE_URL")) What does the log message actually show? This will confirm whether the environment variable is being passed correctly or not. I note you are using a different YAML structure for "environment" under go_app than

Re: [go-nuts] help

2024-02-18 Thread Steven Hartland
What’s your DATABASE_URL? If your on Windows make sure you use localhost not 127.0.0.1 as they aren’t necessarily the same thing On Sun, 18 Feb 2024 at 04:54, Sunday Ajayi wrote: > Hi guys, > Please I am having a little issue with my go project using docker. > > I set up my Postgres db in

Re: [go-nuts] help

2024-02-18 Thread Luca Pascali
Hi. Error says that the connection string that is executed is pointing to TCP 127.0.0.1:5432 from your docker compose file there is no such string, you are correctly using go_db host name to work inside the docker network. So my guess is that you are not executing what you think you are

Re: [go-nuts] help

2024-02-17 Thread Sunday Ajayi
Hi guys, Please I am having a little issue with my go project using docker. I set up my Postgres db in docker with my go app but it is unable to connect. Please what could be the issue? I will share the docker-compose file and the main.go here main.go package main import ( "database/sql"

[go-nuts] help

2024-02-17 Thread Pilar Garcia
hi everyone. my name is pilar. im trying to learn coding for the first time in my life..im so lost can anyone let me know how to even begin on this mission. please any advise will be greatly appreciated. you folks have a great day cant waint to hear from ya -- You received

Re: [go-nuts] help with thread limit

2024-01-31 Thread Robert Engels
You can use cpuctrl or similar to limit the number of visible cores when you start the process. On Jan 31, 2024, at 8:43 PM, Steve Roth wrote:I am running Go code on a shared web hosting server from a major hosting company.  Using cgroups, they limit the number of threads any user can create to

[go-nuts] help with thread limit

2024-01-31 Thread Steve Roth
I am running Go code on a shared web hosting server from a major hosting company. Using cgroups, they limit the number of threads any user can create to 25. Up until a week ago, they had me running on a server with 24 cores, and everything worked fine. Now they've moved me to a new server with

Re: [go-nuts] Help understanding slices, variable arguments, and passing slices to functions

2023-09-25 Thread Jan Mercl
On Mon, Sep 25, 2023 at 1:57 PM Andrew Pillar wrote: A nice discussion of slices can be found for example here: https://research.swtch.com/godata tl;dr: Yes, slices are passed by value (everything in Go is passed by value), but a slice does not contain the backing array, only a pointer to it.

[go-nuts] Help understanding slices, variable arguments, and passing slices to functions

2023-09-25 Thread Andrew Pillar
I have some code whereby I am iterating over some data, putting that data into a buffer slice defined outside the loop, then passing the contents of that buffer slice to a function which returns a struct containing that data. See the playground link as a stripped down demonstration of what I'm

[go-nuts] Help with WASM performance

2023-09-15 Thread Stephen Illingworth
Hello, I'm hoping for some help with a Go WASM project I am working on. The project is based on another project of mine, which runs very well and I have no concerns about its performance. The WASM project however performs poorly. The help I need is to determine whether the performance of the

Re: [go-nuts] Help me study resources or guides

2023-05-24 Thread Marcello H
You could take a look at: https://mehdihadeli.github.io/awesome-go-education/ Op dinsdag 23 mei 2023 om 14:33:18 UTC+2 schreef Zhang Jie (Kn): > 1. https://go101.org, from beginner to true gopher > 2. go perf book, search it from github, this will teach you some > optimization techniques > 3.

Re: [go-nuts] Help me study resources or guides

2023-05-23 Thread Zhang Jie (Kn)
1. https://go101.org, from beginner to true gopher 2. go perf book, search it from github, this will teach you some optimization techniques 3. here's a reading list about golang internals: https://hitzhangjie.notion.site/149643669e0846e6b8e3294d04a6df0d?v=e1cea88688ec4102ae5d9af8cf9ac4c7,

Re: [go-nuts] Help me study resources or guides

2023-05-23 Thread Zhang Jie (Kn)
Here're some good materials: 1. https://go101.org, after learning this, you will be a true gopher. 2. go语言设计实现,maybe there's no English version. When I learns golang, I want to know its internals, and I kept lots of good articles, here:

Re: [go-nuts] Help me study resources or guides

2023-05-03 Thread Kamil Ziemian
Hello, I now try to read "Go Language Specification", which you must read to became true Gopher. If you want to read this document, I offer all my help, but not overestimate me. Recently I even doubt if I'm programmer at all, maybe just advanced hobbyist. Because Go Spec my by too much for

Re: [go-nuts] Help me study resources or guides

2023-05-02 Thread Rajesh Pandian
HI Nyilynn, I have watched Matt's Golang videos about concurrency and few others and I have to say it is Brilliant! I highly recommend it. (And Thank you Matt for the brilliant content!! ) If you are interested in books then "Learning Go" from O'reilly was also helpful to me. If you want

Re: [go-nuts] Help me study resources or guides

2023-04-28 Thread Matt KØDVB
You can find my video class at https://www.youtube.com/playlist?list=PLoILbKo9rG3skRCj37Kn5Zj803hhiuRK6; people seem to like it Matt > On Apr 26, 2023, at 9:45 PM, Nyilynn Htwe wrote: > > I am starting to learn GO programming language with this course >

[go-nuts] Help me study resources or guides

2023-04-27 Thread Nyilynn Htwe
I am starting to learn GO programming language with this course . Can you all guide me how to learn and how to be geek at Go? Thank you for reading -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Help to choose the right type of the key for a map.

2023-03-18 Thread alex-coder
Ian and Andy, looks like the to string conversion works and even does not look ugly. :-) Thank you so much. пятница, 17 марта 2023 г. в 15:01:31 UTC+3, alex-coder: > Andy, thank you. > > In case there would be a choice between ugly and achievable, I must take > the last one:-) > > Another

Re: [go-nuts] Help to choose the right type of the key for a map.

2023-03-17 Thread alex-coder
Andy, thank you. In case there would be a choice between ugly and achievable, I must take the last one:-) Another thing I have found it that it is impossible to use type as a parameter when you call to a function. How to pass type to function argument in Go - Stack Overflow

Re: [go-nuts] Help to choose the right type of the key for a map.

2023-03-16 Thread Andy Balholm
I would guess that in the case of AST nodes, you're likely more interested in the *identity* of the nodes than their *values*. In that case, you should use the pointers to the nodes as your map keys. If the *values* truly are what you care about, use the go/format package to convert the node

Re: [go-nuts] Help to choose the right type of the key for a map.

2023-03-16 Thread alex-coder
>> Sure, convert to a string and use that as a map key. :-) no, no, no. it looks very very ugly. четверг, 16 марта 2023 г. в 00:26:35 UTC+3, Ian Lance Taylor: > On Wed, Mar 15, 2023 at 2:16 PM alex-coder wrote: > > > > Ian, thank you. > > but may be the is any workaround ? > > Use as a key not

Re: [go-nuts] Help to choose the right type of the key for a map.

2023-03-15 Thread Ian Lance Taylor
On Wed, Mar 15, 2023 at 2:16 PM alex-coder wrote: > > Ian, thank you. > but may be the is any workaround ? > Use as a key not directly but like a derived from those interface/structure > types ? > Of course I may declare key like string and use switch + .(type) to mimic it. Sure, convert to a

Re: [go-nuts] Help to choose the right type of the key for a map.

2023-03-15 Thread alex-coder
Ian, thank you. but may be the is any workaround ? Use as a key not directly but like a derived from those interface/structure types ? Of course I may declare key like string and use switch + .(type) to mimic it. So, a little bit more. there is a go standard package named ast. the docs about it

Re: [go-nuts] Help to choose the right type of the key for a map.

2023-03-15 Thread Ian Lance Taylor
On Wed, Mar 15, 2023 at 9:17 AM alex-coder wrote: > > There is a package named ast, inside there are a lot of structures like: > ast.Comment, ast.Field, ast.Node and so on. > And I whould like to use types of those structure as a keys. > So, I could not figure out what type of the key I should

Re: [go-nuts] Help with language change proposal

2023-03-15 Thread Landon Cooper
Thanks very much for the feedback, Axel. I didn't think it was harsh, this is just the kind of information I needed before burning needless effort on the idea. Getting started with these conversations is quite intimidating because there is so much information and history, it's hard to find what

[go-nuts] Help to choose the right type of the key for a map.

2023-03-15 Thread alex-coder
Hi All ! There is a package named ast, inside there are a lot of structures like: ast.Comment, ast.Field, ast.Node and so on. And I whould like to use types of those structure as a keys. So, I could not figure out what type of the key I should use in order to store in a map something under the

Re: [go-nuts] Help with language change proposal

2023-03-15 Thread 'Axel Wagner' via golang-nuts
Hi, Some comments in-line: > > Who does this proposal help, and why? > go programmers who want to reduce boiler plate code. I believe you should definitely be more explicit with the problem you are trying to solve. "Today, if you want to do X, you have to write Y. That is bad, because Z".

Re: [go-nuts] Help Bootstrapping to ESXi

2023-01-14 Thread Brian Candler
P.S. For using tinygo to generate Linux executables, see: https://tinygo.org/getting-started/install/linux/ https://tinygo.org/docs/guides/linux/ But I couldn't find the minimum kernel version requirements. On Saturday, 14 January 2023 at 11:41:21 UTC Brian Candler wrote: > On Friday, 13

Re: [go-nuts] Help Bootstrapping to ESXi

2023-01-14 Thread Brian Candler
On Friday, 13 January 2023 at 20:42:28 UTC mi...@newclarity.net wrote: I SSHed into the ESXi server, used wget to pull down the Golang tarball, used tar to extract it from within the ESXi shell, and then used `go run hello.go` in the ESXi shell and got a runtime error of "epollwait on fd 4

Re: [go-nuts] Help Bootstrapping to ESXi

2023-01-13 Thread Anthony Brown
I think the difference is that I didn't actually do the compilation on the ESXi host itself, I just ran the binary there. 'go run hello.go' on the ESXi host will, attempt, to both compile and execute the compiled binary; I'm guessing the ESXi host itself though doesn't have some of the same

Re: [go-nuts] Help Bootstrapping to ESXi

2023-01-13 Thread Mike Schinkel
> On Jan 13, 2023, at 1:32 AM, Anthony Brown wrote: > > I haven't made a bootstrapped Go toolchain so I can't help with that but I > can provide the following information: > > ESXi knows how to run ELF binaries, the interesting part then becomes what > architecture of CPU do you have the

[go-nuts] Help Bootstrapping to ESXi

2023-01-09 Thread Brett Bergner
Good afternoon, hoping to get a little help. I am trying to build a bootstrap candidate that allows me to build and run go programs on an ESXi server. I am following this blog, and the issue is that my bootstrap

Re: [go-nuts] Help debugging a SIGSEGV - "unexpected signal during runtime execution"

2022-12-08 Thread Gerald Parker
Hi Kurtis, Thanks for the response. To be clear this issue is the defect that I'm encountering. The issue was originally logged against *v1.0.0-beta4*. I am using *v1.0.0-beta6* but the defect has not been fixed. This defect occurs when calling

Re: [go-nuts] Help debugging a SIGSEGV - "unexpected signal during runtime execution"

2022-12-08 Thread Kurtis Rader
It superficially looks like you're running the code from https://github.com/go-vgo/robotgo/blob/master/examples/key/main.go. However, The line number 136 in main.go in the backtrace doesn't make any sense since the example code from the project only has 134 lines. Did you modify the example code?

[go-nuts] Help debugging a SIGSEGV - "unexpected signal during runtime execution"

2022-12-08 Thread Gerald Parker
Hi all, I'm using go version 1.19.4 darwin-amd64 I keep getting the following errors while trying to use a function from the robotgo package. I'm not experienced in C and could use some help trying to find the problem fatal error: unexpected signal during runtime execution [signal SIGSEGV:

Re: [go-nuts] Help with sync.Cond failing to signal

2022-06-14 Thread Kevin Burke
I've added https://go-review.googlesource.com/c/go/+/412237 to try to make this obvious to more people. On Sun, Jun 12, 2022 at 2:47 AM Brian Candler wrote: > And just as an aside, I think you would be interested in the talk > "Rethinking Classical Concurrency Patterns" by Bryan C. Mills >

Re: [go-nuts] Help with sync.Cond failing to signal

2022-06-12 Thread Brian Candler
And just as an aside, I think you would be interested in the talk "Rethinking Classical Concurrency Patterns" by Bryan C. Mills https://www.youtube.com/watch?v=5zXAHh5tJqQ On Sunday, 12 June 2022 at 05:06:47 UTC+1 ke...@burke.dev wrote: > That's a very clear explanation, it's obvious what the

Re: [go-nuts] Help with sync.Cond failing to signal

2022-06-11 Thread Kevin Burke
That's a very clear explanation, it's obvious what the problem is now. Thank you! On Saturday, June 11, 2022 at 9:36:59 AM UTC-7 se...@liao.dev wrote: > sync.Cond does not affect goroutine scheduling priority, and Signal only > makes the waiting goroutine available to be scheduled, but not

Re: [go-nuts] Help with sync.Cond failing to signal

2022-06-11 Thread 'Sean Liao' via golang-nuts
sync.Cond does not affect goroutine scheduling priority, and Signal only makes the waiting goroutine available to be scheduled, but not force it to be. After a Signal() (and Unlock()), every other waiting worker and the flusher then contends (fairly) for the lock. What you want appears a better

[go-nuts] Help with sync.Cond failing to signal

2022-06-11 Thread Kevin Burke
Hi, Recently I inherited some code in production that was hitting an error case that I didn't think should be possible to hit. I reduced it down to this test case. To be clear, there are several different ways to improve the code here, but I'd like to understand why it's behaving the way it

Re: [go-nuts] Help with GOLLVM

2022-01-04 Thread 'Than McIntosh' via golang-nuts
Hi, >>The whole point of my poc was to be able to get the LLVMIR of GO then put it into an iOS app with bitcode enable. What are you saying is that it is not possible to achieve this? It's definitely outside the normal/expected use of gollvm, but it seems at least possible to do this. The key

Re: [go-nuts] Help with GOLLVM

2022-01-03 Thread Danilo bestbug
Hello, Thanks for the answer. I've still some question then. The whole point of my poc was to be able to get the LLVMIR of GO then put it into an iOS app with bitcode enable. What are you saying is that it is not possible to achieve this? Or it's possible but I've to add the missing symbols? If is

[go-nuts] help with pcapgo

2022-01-01 Thread webuser 1300
I'm playing with "github.com/google/gopacket" and "github.com/google/gopacket/pcapgo" packetSource := gopacket.NewPacketSource(handle, handle.LinkType()) for packet := range packetSource.Packets() { app := packet.ApplicationLayer() b :=

Re: [go-nuts] Help with GOLLVM

2021-12-16 Thread 'Than McIntosh' via golang-nuts
Greetings, The code that Go compilers emit is closely tied to the Go runtime-- any compiled Go code (including *.ll files) will have references to symbols that it needs from the runtime. When you try to convert your LLVM-produced bitcode into a binary via clang helloworld.ll -o helloworldLLVM

[go-nuts] Help with GOLLVM

2021-12-16 Thread Danilo bestbug
Hello, I've create a docker images with ubuntu 20.10 with GOLLVM, I'm using at the moment a simple test repository , I was able to create the ll file with the following command: go build -gccgoflags -static-libgo -x -work 1> transcript.txt 2>&1

[go-nuts] Help getting database/sql pooling merged

2021-10-22 Thread Steven Hartland
There's been a long standing bug in database/sql pooling which means SetConnMaxIdleTime doesn't work. I found and fixed the bug back in June of 2020, but have so far been unable to get this relatively

Re: [go-nuts] Help Gmail Post Master

2021-09-08 Thread Kurtis Rader
Can you show us an example of the code you've written that doesn't do what you expect? Can you expand on what you mean by "some problem"? Did you read the associated documentation at https://pkg.go.dev/google.golang.org/api@v0.56.0/gmailpostmastertools/v1 and have you verified you can get those

[go-nuts] Help Gmail Post Master

2021-09-08 Thread Muhammad Abdur Rofi
Hello Guys, My name is Abdur Rofi, I'm from Indonesia. I'm new in Golang. I have some problem to use https://github.com/googleapis/google-api-go-client/tree/master/gmailpostmastertools. Maybe someone can help me to show some example about how to use this library. Thank's -- You received

[go-nuts] Help me troubleshoot this missing value problem

2021-06-19 Thread Tong Sun
Please take a look at https://play.golang.org/p/k_CM_cJgSvJ line 77 tries to output .FirstKS then .SecondKS if it is not nil However, there are two cases, the debug output shows there is .SecondKS field but the template thinks there is ``: alt MINUS map[Id:EditorCutLineBackward

[go-nuts] help with the Google Pub/Sub Go client API

2021-04-15 Thread 'Dan Kortschak' via golang-nuts
I am trying to set up a toy to understand Google's Pub/Sub service Go client API. I have had no trouble with publishing and have a local emulator for the Google Scheduler service to build against, but I am having a lot of trouble getting subscriptions to work. I am able get a subscription to work

Re: [go-nuts] Help with tcpserver

2021-04-01 Thread Perry Couprie
It works now i added the ReadDeadline, thanks for the help :-) Perry On Wednesday, March 31, 2021 at 1:22:20 PM UTC+2 Brian Candler wrote: > I think that in principle you are correct to perform your reads inside a > goroutine, to allow them to be received asynchronously. > > If Read() blocks,

Re: [go-nuts] Help with tcpserver

2021-03-31 Thread Brian Candler
I think that in principle you are correct to perform your reads inside a goroutine, to allow them to be received asynchronously. If Read() blocks, it's not a problem unless you want to shut down the connection from the server side, and you can do that by setting a read timeout which will

Re: [go-nuts] Help with tcpserver

2021-03-31 Thread Perry Couprie
The protocol i am programming for sends a header of 8 bytes that contains a body length. My problem is dat c.Read(buf) is blocking. Can i read from the tcp connection non blocking ? On Wednesday, March 31, 2021 at 9:08:48 AM UTC+2 Brian Candler wrote: > On Wednesday, 31 March 2021 at

Re: [go-nuts] Help with tcpserver

2021-03-31 Thread Brian Candler
On Wednesday, 31 March 2021 at 04:13:12 UTC+1 matt@gmail.com wrote: > for i := 0; i > 5; i++ { > // handle a single message > n, err := c.Read(buf) > if err == io.EOF { > break > } > fmt.Fprintf(c, "Message Count %d, Data %s", i+1, buf[:n]) > I will point out that

Re: [go-nuts] Help with tcpserver

2021-03-31 Thread Perry Couprie
I am programming a binary protocol. The demo with telnet and the max of 5 messages was for testing this problem. I need to be able send even when not recieving data. The program now works, when de the client breaks the connection, there is no problem. When de server stops the connection it

Re: [go-nuts] Help with tcpserver

2021-03-30 Thread Matt Harden
Why are you using channels for this? I see some issues in the code, but without knowing what you're actually trying to accomplish, it's hard to give advice. To do exactly what you described, I would simply change handleDeviceConnection() to look similar to this: func handleDeviceConnection(c

[go-nuts] Help with tcpserver

2021-03-30 Thread Perry Couprie
Hi, I create a tcp server with goroutines. When the tcp client closes the connection it workes. After recieving 5 message from a telnet client it tries to close the connection. Some times it works, and sometimes not. I create a smal demo : https://pastebin.com/raw/BjZWzLFq This is my first

Re: [go-nuts] Help with contributing to the Golang

2021-03-18 Thread Ian Lance Taylor
On Thu, Mar 18, 2021 at 9:55 AM Kirill Prokopovich wrote: > > Hello everyone! > Can somebody help with some advice about starting contributing in Golang? > > I've already read https://golang.org/doc/contribute.html and tried to find > some issues from

[go-nuts] Help with contributing to the Golang

2021-03-18 Thread Kirill Prokopovich
Hello everyone! Can somebody help with some advice about starting contributing in Golang? I've already read https://golang.org/doc/contribute.html and tried to find some issues from https://github.com/golang/go/labels/help%20wanted , but it's not so obvious how to choose a free issue but I'm

[go-nuts] Help ASCII armor PGP Messages with golang.org/x/crypto/openpgp

2021-02-27 Thread Hugo3
https://play.golang.org/p/HpXdDlKcOPt This is an example what I want to do is return a encrypted message from Alice that can only be read by decrypted with Rogers key to reveal a sensitive message. -- You received this message because you are subscribed to the Google Groups "golang-nuts"

[go-nuts] Help test arg support in Mage

2020-12-28 Thread Nate Finch
Mage (magefile.org and github.com/magefile/mage) is getting support for arguments in targets and dependencies. I'd love some people running the PR branch through its paces to make sure I haven't missed anything before landing it, since this is kind

[go-nuts] Help shape the future of Go via the 2020 Go Developer Survey

2020-10-21 Thread 'Alice Merrick' via golang-nuts
Hey folks, It's time again for the annual Go Developer Survey! There have been a few changes to this year's survey you can read about at the blog . We'd love to hear from everyone who uses Go, used to use Go, or is interested in using Go, to help ensure the

[go-nuts] Help merging fix to http2 code

2020-09-13 Thread Jared Newman
Hey Gophers, Github issue #40423 details an issue that can cause an http.Server running http2 to fail to return connection-level flow control which ultimately causes the connection to hang. The fix to this issue is 1 line change (with 60 lines of

[go-nuts] Help: Encrypting and Decrypting ASCII armor PGP Messages with golang.org/x/crypto/openpgp

2020-08-18 Thread Samuel Lorch
Hi, i have been trying to decrypt and encrypt ASCII armor PGP Messages that i receive and send to a API. I Wrote a function for decrypting messages and another one for encrypting messages. The Decrypting function Works and i can decrypt the API's messages. But My encrypt function Seems to

[go-nuts] Help Wanted: Implement seek support in FLAC library

2020-07-14 Thread tslocum
Hi all, if you or someone you know is interested in tinkering with audio decoding, please take a look at this issue: https://github.com/mewkiz/flac/issues/16 Partial seek support may be available here: https://github.com/mewkiz/flac/tree/seek -- You received this message because you are

[go-nuts] Help? Looking for info on how net/http and net/http2 are supposed to interact in the context of noDialClientConnPool

2020-06-30 Thread Chris Friesen
Hi all, I've got a weird bug in Kubernetes where an unclean shutdown of kube-apiserver sometimes causes kubelet to lose connectivity with kube-apiserver and then get stuck in a mode where it's unable to regain connectivity. Looking at the running "stuck" kubelet process with strace I see it

Re: [go-nuts] Help with code reproducing a change in Go 1.15 CL 229578

2020-06-21 Thread Florin Pățan
Hi Ian, Thank you for your reply. At the moment, I don't have any data about this. The question raised from the fact that the language in the documentation suggests that a compiler error would occur, at least to me as a user with English as a second language. So, when I created some test

Re: [go-nuts] Help with code reproducing a change in Go 1.15 CL 229578

2020-06-18 Thread Ian Lance Taylor
On Thu, Jun 18, 2020 at 1:54 AM Florin Pățan wrote: > > According to the Go 1.15 documentation, the change introduced in > https://golang.org/cl/229578 should change the program behavior, and users > are expected to perform modifications to their code. > > > Package unsafe's safety rules allow

[go-nuts] Help with code reproducing a change in Go 1.15 CL 229578

2020-06-18 Thread Florin Pățan
According to the Go 1.15 documentation, the change introduced in https://golang.org/cl/229578 should change the program behavior, and users are expected to perform modifications to their code. > Package unsafe's safety rules allow converting an unsafe.Pointer into uintptr when calling certain

Re: [go-nuts] [HELP] Install golang.org/x/tools/present successful but cannot find the binary

2020-05-27 Thread gede . pentium
Hi Sebastien, Thanks for the answer. Yes I just realised I was installing the package instead of the command. It works now :+1: On Thursday, May 28, 2020 at 1:16:00 AM UTC+8, Sebastien Binet wrote: > > hi, > > golang.org/x/tools/present is the package. > golang.org/x/tools/cmd/present is the

Re: [go-nuts] [HELP] Install golang.org/x/tools/present successful but cannot find the binary

2020-05-27 Thread Sebastien Binet
hi, golang.org/x/tools/present is the package. golang.org/x/tools/cmd/present is the command. you should install the command :) (which will in turn compile and install the package under the cover). hth, -s ‐‐‐ Original Message ‐‐‐ On Wednesday, May 27, 2020 7:05 AM, Gede Pentium

[go-nuts] [HELP] Install golang.org/x/tools/present successful but cannot find the binary

2020-05-27 Thread Gede Pentium
I've tried to install the *golang.org/x/tools/present*, but still cannot find the *present* binary in $GOPATH/bin Command: *go get -u -v golang.org/x/tools/present* There is no error in the installation, even after adding *-v* flag there is no error go version *go1.14.3* darwin/amd64 My

[go-nuts] help understanding weird Benchmark results

2020-05-19 Thread Warren Bare
Hi Folks, I'm getting weird results from Benchmark. Maybe someone can help me understand this. I'm running on amd-64 (Threadripper 16 core 32 thread) Windows 10. Go 1.14.3 I have the benchmark below (main_test.go) on a minimum "hello world" main.go (just like playground). When I run the

Re: [go-nuts] Help needed - os.exec

2020-04-05 Thread Ian Lance Taylor
On Sun, Apr 5, 2020 at 3:36 PM R Srinivasan wrote: > > I cannot figure the error in the following. > package main > > import ( > "io" > "os" > "os/exec" > "strings" > ) > > func Run(args []string) { > lf, _ := os.Create("lf.log") > defer lf.Close() > cmd := exec.Command(args[0],

Re: [go-nuts] Help needed - os.exec

2020-04-05 Thread burak serdar
On Sun, Apr 5, 2020 at 4:36 PM R Srinivasan wrote: > > I cannot figure the error in the following. > cmd := exec.Command(args[0], strings.Join(args[1:], " ")) Do not join the args. You're passing one arg, "build ./", instead of two args "build" "./" to exec. Instead: cmd :=

[go-nuts] Help needed - os.exec

2020-04-05 Thread R Srinivasan
I cannot figure the error in the following. package main import ( "io" "os" "os/exec" "strings" ) func Run(args []string) { lf, _ := os.Create("lf.log") defer lf.Close() cmd := exec.Command(args[0], strings.Join(args[1:], " ")) stderr, _ := cmd.StderrPipe() cmd.Start() io.Copy(lf, stderr)

Re: [go-nuts] help w/ therecipe/qt

2020-03-01 Thread rob
Yes, thanks Justin.  It looks that's just what I need. --rob On 3/1/20 3:16 PM, Justin Israel wrote: On Mon, Mar 2, 2020 at 6:48 AM rob > wrote: The exact problem is one of the first in chapter 4 MainWindow::MainWindow() {    

Re: [go-nuts] help w/ therecipe/qt

2020-03-01 Thread Justin Israel
On Mon, Mar 2, 2020 at 6:48 AM rob wrote: > The exact problem is one of the first in chapter 4 > > MainWindow::MainWindow() > { > setWindowTitle("SRM System"); > setFixedSize(500, 500); > QPixmap newIcon("new.png"); > QPixmap openIcon("open.png"); > QPixmap

Re: [go-nuts] help w/ therecipe/qt

2020-03-01 Thread rob
The exact problem is one of the first in chapter 4 MainWindow::MainWindow() {    setWindowTitle("SRM System");    setFixedSize(500, 500);    QPixmap newIcon("new.png");    QPixmap openIcon("open.png");    QPixmap closeIcon("close.png");    // Setup File Menu    fileMenu =

[go-nuts] help w/ therecipe/qt

2020-02-29 Thread Justin Israel
You are likely to get the most focused support by checking with the project: https://github.com/therecipe/qt/blob/master/README.md Maybe asking on their slack channel if you can't figure it out from the Qt docs + therecipe/qt api? -- You received this message because you are subscribed to the

Re: [go-nuts] help w/ therecipe/qt

2020-02-29 Thread rob
"Getting Started w/ Qt 5," by Benjamin Baka.  Published by Packtpub On 2/29/20 2:55 PM, Rob Muhlestein wrote: Hi there Rob, would you mind sharing that book so I can share it with people on my rwxrob.live stream. I like the idea of doing what you are doing. I might be able to help you past

[go-nuts] help w/ therecipe/qt

2020-02-29 Thread rob
Hi.  I'm trying to learn therecipe/qt by working my way thru a book using C++ examples and translating them into Go.  I'm stuck at QKeySequence stuff. My computer runs ubuntu 18.04, and I installed Go 1.13.8 on it, along w/ all the Qt development stuff from qt.io, and therecipe/qt. Where

Re: [go-nuts] help with using %q in fmt

2020-02-22 Thread 'simon place' via golang-nuts
Thanks a lot, i seem to have been a bit fixated on there already being more direct symmetry between print and scan. anyway, i hacked up something that is working as i wanted; https://play.golang.org/p/BZ437rSo5DU (when you think about it, a recursive solution was always going to need a

Re: [go-nuts] help with using %q in fmt

2020-02-21 Thread Ian Lance Taylor
On Fri, Feb 21, 2020 at 4:35 PM 'simon place' via golang-nuts wrote: > > basically i want to save a file name in a file (with some url styling for > human readability); > > https://play.golang.org/p/sWYbyU7nuSo > > which works, but not with a space in the name; > >

[go-nuts] help with using %q in fmt

2020-02-21 Thread 'simon place' via golang-nuts
basically i want to save a file name in a file (with some url styling for human readability); https://play.golang.org/p/sWYbyU7nuSo which works, but not with a space in the name; https://play.golang.org/p/sswqBRL8dZW it needs to be quoted, so i figure '%q' is for this; %q a

Re: [go-nuts] Help with Oauth2 "grant_type=client_credentials"

2020-02-11 Thread tmack8080
This looks like what I need. Thanks Chris. On Tuesday, February 11, 2020 at 7:45:56 PM UTC-5, Chris Broadfoot wrote: > > Try this package: > https://pkg.go.dev/golang.org/x/oauth2/clientcredentials?tab=doc > > On Tue, Feb 11, 2020, 4:43 PM andrey mirtchovski > wrote: > >> i would strongly

Re: [go-nuts] Help with Oauth2 "grant_type=client_credentials"

2020-02-11 Thread Chris Broadfoot
Try this package: https://pkg.go.dev/golang.org/x/oauth2/clientcredentials?tab=doc On Tue, Feb 11, 2020, 4:43 PM andrey mirtchovski wrote: > i would strongly advise against implementing advice received online > for something as important as auth. my suggestion is to work with curl > from the

Re: [go-nuts] Help with Oauth2 "grant_type=client_credentials"

2020-02-11 Thread andrey mirtchovski
i would strongly advise against implementing advice received online for something as important as auth. my suggestion is to work with curl from the command line (examples are given on the webpage you linked) until you have the process working. implementing that afterwards using http.Client will be

[go-nuts] Help with Oauth2 "grant_type=client_credentials"

2020-02-11 Thread tmack8080
Hi, I'm not a programmer. I have this working in PowerShell. Requirement: Query hardware vendor web APIs, using the device serial number, for device warranty status. The vendors require that the "client_id" and "client_secret", as well as the "grant_type=client_credentials" be

[go-nuts] Help em if e else em Go

2019-12-28 Thread Everton Marques
Existe esse grupo em Português: https://groups.google.com/forum/m/#!forum/golang-brasil -- 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

[go-nuts] Help get me started on a project

2019-12-17 Thread Rich
I need to write a program that runs an external program and the user needs to interact with that external program. So I know I can do something like this: func main() { cmd := exec.Command("/usr/local/bin/interactiveApp") cmd.Stdin = os.Stdin cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr

Re: [go-nuts] Help with Go channels and select talk

2019-12-12 Thread 'Bryan C. Mills' via golang-nuts
On Thu, Dec 12, 2019 at 1:17 AM Egon Kocjan wrote: > My demo is based on a real problem in our code. The issue here is that I > cannot paste proprietary code and it's large and complex anyway. I > distilled the problem to a bidi-communication coding exercise. The "go srv" > in the real code is

Re: [go-nuts] Help with Go channels and select talk

2019-12-11 Thread Egon Kocjan
My demo is based on a real problem in our code. The issue here is that I cannot paste proprietary code and it's large and complex anyway. I distilled the problem to a bidi-communication coding exercise. The "go srv" in the real code is an external process with stdin and stdout with a simple

Re: [go-nuts] Help with Go channels and select talk

2019-12-09 Thread 'Bryan C. Mills' via golang-nuts
I agree. It seems to me that the problem in example 2 is deep in the architecture of the program, not just a detail of the `select` statements. The `connect` function essentially functions as a single-worker “worker pool”, storing the data in a goroutine (specifically, in the closure of the

[go-nuts] Help with Go channels and select talk

2019-12-09 Thread luka . venac
You can do it without a goroutine as long as the channel has at least one buffer slot so execution passes to the select and uses the data. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails

[go-nuts] help with reflect

2019-12-09 Thread Vasiliy Tolstov
Hi! I'm stuck at reflection based struct assignment. example struct type TestStruct struct { Slice []*string } func TestReflect(t *testing.T) { s1 := "one" s2 := "two" s1 := "one" s2 := "two" nodes := []*string{, } v := {} valueOf := reflectValue(v) typeOf := reflectType(v) for i := 0; i

Re: [go-nuts] Help with Go channels and select talk

2019-12-07 Thread Robert Engels
I’m sorry, but it’s very hard to understand when you start with solutions. I think maybe clearly restating the problem will allow more people to offer up ideas. To be honest at this point I’m not really certain what you’re trying to demonstrate or why. > On Dec 8, 2019, at 12:44 AM, Egon

Re: [go-nuts] Help with Go channels and select talk

2019-12-07 Thread Egon Kocjan
I meant lock-free as in "without explicit locks". The original challenge still stands if someone has a better solution than me: "The deadlocks in 2_1.go and 2_2.go are caused by the simplistic and wrong implementation of bidi-comm, which is what I'll be illustrating. I have three working

Re: [go-nuts] Help with Go channels and select talk

2019-12-07 Thread Robert Engels
I understand what you are saying but I’ll still suggest that your premise/design is not correct. There are plenty of useful lock free structures in Go (see github.com/robaho/go-concurrency-test) but that is not what you are attempting here... you are using async processing - these are

Re: [go-nuts] Help with Go channels and select talk

2019-12-07 Thread Egon Kocjan
I'll cite myself: "I'm preparing a short talk about Go channels and select. More specifically, I want to show what not to do." and "it would be tempting to just combine two goroutines into one and handle caching in a single loop without using locks (I see developers avoid atomics and locks if

  1   2   3   >