Re: [go-nuts] Re: 1.22.0 ServeMux HandleFunc infinite loop

2024-02-08 Thread Kyle Shannon
https://groups.google.com/d/msgid/golang-nuts/445d31e9-e9ce-407a-985c-ad448da9f786n%40googlegroups.com <https://groups.google.com/d/msgid/golang-nuts/445d31e9-e9ce-407a-985c-ad448da9f786n%40googlegroups.com?utm_medium=email_source=footer>. -- Kyle -- You received this message because you are

[go-nuts] Possible Go Compiler or Runtime bug?

2023-07-27 Thread Kyle Harrity
I first asked this on https://reddit.com/r/golang but the contribution guide on github recommends this forum, so I'll post here before finally raising an issue on github if this appears to be a real bug. ORIGINAL POST: I came across this issue in some code I was reviewing today where a

Re: [go-nuts] What's go's convention for specifying the equivolent of configure --prefix?

2022-12-01 Thread Kyle
I'd use godotenv in this case. True, it will require a .env file with a path variable in it and true it won't be as having consts but it will do the job. import ( "os" "github.com/joho/godotenv" ) func init() { if os.Getenv("MODE") != "PROD" { godotenv.Load() } } // ... //

[go-nuts] Re: Interfaces holding integers and memory allocations

2022-04-20 Thread Kyle Nusbaum
package, of course. -- Kyle On Tuesday, December 22, 2020 at 2:30:55 PM UTC-6 ben...@gmail.com wrote: > Wow -- yes, that's pretty significant! (Though point taken about "real > workloads".) Thanks for sharing this. > > On Tuesday, December 22, 2020 at 11:44:25 PM UTC+13 arn

Re: [go-nuts] Announcing sqlc: Compile SQL queries to type-safe Go

2019-12-11 Thread kyle
Vasiliy, Take a look at the supported examples. sqlc has no problem handling five joins and a having clause. Kyle On Wednesday, December 11, 2019 at 12:18:20 PM UTC-8, Vasiliy Tolstov wrote: > > Thanks! But how about real world cases like joining 5 tables and using > having and ot

[go-nuts] Announcing sqlc: Compile SQL queries to type-safe Go

2019-12-11 Thread kyle
guided walk through and more example code. Happy to answer any questions you have about the project. Cheers, Kyle -- 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

[go-nuts] [ANN] sqlc: Generate type-safe Go from SQL

2019-09-03 Thread kyle
the Getting Started[1] guide. Cheers, Kyle [0] https://github.com/kyleconroy/sqlc [1] https://github.com/kyleconroy/sqlc/blob/master/README.md#getting-started -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this grou

[go-nuts] Re: How to mock functions in Go ?

2019-08-01 Thread kyle . butz
You'll want to check out `gomock` and `mockgen`. You'll need to write an interface to be able to mock, so you may need to write a receiver struct to encapsulate os.Hostname() or whatever you need to mock, then mock your HostnameGetter (surely a better name than that), maybe? type OsClient

[go-nuts] Re: How to mock functions in Go ?

2019-08-01 Thread Kyle Butz
You'll want to look into gomock and mockgen. To get started mocking, you'll need an interface, so maybe writing a receiver function encapsulating os.Hostname(), then consuming that with an interface. type OsClient struct {} func (o *OsClient) GetOSHostname() (string, error) { return

Re: [go-nuts] New Modules and git clones

2018-11-14 Thread Kyle Wood
I recommend letting the go tool handle this. Leave the dependency out of the go.mod file entirely. Run go build as normal, and it will automatically determine the version strings for the dependencies and insert them into your go.mod for you. On Wed, Nov 14, 2018 at 5:43 AM Russel Winder wrote:

Re: [go-nuts] Does client.go#transport() reuse s global DefaultTransport when http.Client's Transport is nil?

2018-10-17 Thread Kyle Butz
-5, Burak Serdar wrote: > > On Wed, Oct 17, 2018 at 10:30 AM Kyle Butz > wrote: > > > > Hi All! > > > > I'm having trouble understanding whether a new http.Client{} with no > Transport set will use a new copy of DefaultTransport, or the global? > &

[go-nuts] Does client.go#transport() reuse s global DefaultTransport when http.Client's Transport is nil?

2018-10-17 Thread Kyle Butz
to the global DefaultTransport defined in transport.go? Thanks for any tips! Kyle -- 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+unsub

[go-nuts] Re: Using "map index expressions" as the value for a range loop

2016-07-07 Thread Kyle Stanly
So, what would be the appropriate use-cases for this; I.E, using a map index expression as the value? On Thursday, July 7, 2016 at 10:05:42 AM UTC-4, Kyle Stanly wrote: > > I noticed that the specification states: > > "As with an assignment, if present the operands

[go-nuts] Using "map index expressions" as the value for a range loop

2016-07-07 Thread Kyle Stanly
I noticed that the specification states: "As with an assignment, if present the operands on the left must be addressable or map index expressions; they denote the iteration variables." Here is the thing I am having trouble imagining... if the iterator keeps a snapshot of the map at the time

[go-nuts] Re: 'go tool pprof' only shows "Type: CPU" and not a callgraph

2016-06-28 Thread Kyle Stanly
Very educational slides, I'll save for later, thanks. On Monday, June 27, 2016 at 5:54:23 PM UTC-4, Dave Cheney wrote: > > What are the exact commands you used? > > It is easy to misuse proof, here is a slide with some of the gotchas. > > >

Re: [go-nuts] Re: 'go tool pprof' only shows "Type: CPU" and not a callgraph

2016-06-28 Thread Kyle Stanly
r however. On Monday, June 27, 2016 at 5:10:39 PM UTC-4, Ian Lance Taylor wrote: > > On Mon, Jun 27, 2016 at 1:52 PM, Kyle Stanly <thei...@gmail.com > > wrote: > > I'd also like to mention I did try both 'runtime/pprof' and > > github.com/pkg/profile, both yield the

Re: [go-nuts] Is there any overhead to casting a pointer (or uintptr) to and from unsafe.Pointer? Can uintptr be safely used to reference an object?

2016-06-20 Thread Kyle Stanly
t; > On Mon, Jun 20, 2016 at 5:45 PM Kyle Stanly <thei...@gmail.com > > wrote: > > The GC is precise, it will not confuse an integer and a pointer. > > Keeping a a pointer in a uintptr as a "reference" to something is safe iff > it will never be casted bac