Re: [go-nuts] gophers analysing genomes

2020-08-29 Thread George Hartzell
'Dan Kortschak' via golang-nuts writes: > The genome of the New Zealand 'lizard', the tuatara[1], has just been > sequenced and published in Nature[2,3]. > > The analysis of the genome included an examination of the repetitive > sequences within the genome. The engine for finding novel repeat

[go-nuts] Re: RFC Package structuring

2020-02-29 Thread hartzell
On Saturday, February 29, 2020 at 10:03:34 AM UTC-8, Sankar wrote: > > I am starting a new project (say `hello`) and I am totally confused about > what package structure to use. [...] > You might find the project-layout notes from the golang-standards GitHub organization (which seems to be a

[go-nuts] What is the meaning of the "go" line in go.mod

2019-12-11 Thread George Hartzell
Hi All, What meaning should I attach to the "go" line in go.mod, e.g. go 1.13 It's not mentioned in the module wiki's [list of go mod directives](https://github.com/golang/go/wiki/Modules#gomod). It seems to be the version of the `go` command that last touched the go.mod file. What, if a

[go-nuts] Looking for an app w/ mult. versions of a dependency

2019-12-05 Thread George Hartzell
Hi All, I'm working on improving the Spack (https://spack.io) package managers support for Go-based application (https://github.com/spack/spack/issues/13023). I'm trying to wrap my head around what Go's support for simultaneously using multiple major versions of a dependency means to Spack. To

Re: [go-nuts] Dependency injection in gorillamux handlers

2019-09-25 Thread George Hartzell
Le lundi 23 septembre 2019 18:35:06 UTC+2, Abhinav Gupta a écrit : > [...] > myRouter.Handle("/endpoint1/", http.HandlerFunc(h.Endpoint1)).Methods("POST", > "OPTIONS") > // or > myRouter.HandleFunc("/endpoint1/", h.Endpoint1).Methods("POST", "OPTIONS") > Should that instead be (replacing 'h.Endpo

Re: [go-nuts] Help understanding mapping Go<->C structures across IOCTL's

2019-08-31 Thread George Hartzell
George Hartzell writes: > > Quick summary, I'm trying to understand the Go structures that cgo > gives me, how they map back onto the C structures and why a Go struct > that doesn't quite match the cgo output seems to work anyway. > [...] Ian gave me a lot of go

Re: [go-nuts] Help understanding mapping Go<->C structures across IOCTL's

2019-08-31 Thread George Hartzell
Ian Lance Taylor writes: > [...] > OK, that is true. Since your program will be using cgo, even though > you aren't calling any C functions, it will be dynamically linked by > default. You could try using "go build -ldflags=-extldflags=-static". > I don't know whether it will work. > To c

Re: [go-nuts] Help understanding mapping Go<->C structures across IOCTL's

2019-08-30 Thread George Hartzell
George Hartzell writes: > [...] > ``` > i2c/i2c.go:15:9: cannot use &buf[0] (type *byte) as type *_Ctype_uchar > in assignment > ``` > > I can't come up with any cast that makes the compiler happy. I'm also > unsure whether that line runs afoul of

Re: [go-nuts] Help understanding mapping Go<->C structures across IOCTL's

2019-08-30 Thread George Hartzell
Ian Lance Taylor writes: > On Thu, Aug 29, 2019 at 6:26 PM George Hartzell wrote: > [...] > There is another approach, which is to use import "C", and then write code > like > > const IoctlConstant = C.IoctlConstant > type GoIoctlType = C.CIoctlType &g

Re: [go-nuts] Help understanding mapping Go<->C structures across IOCTL's

2019-08-29 Thread George Hartzell
Ian Lance Taylor writes: > On Thu, Aug 29, 2019 at 5:15 PM George Hartzell wrote: > > > > Quick summary, I'm trying to understand the Go structures that cgo > > gives me, how they map back onto the C structures and why a Go struct > > that doesn't qui

[go-nuts] Help understanding mapping Go<->C structures across IOCTL's

2019-08-29 Thread George Hartzell
Quick summary, I'm trying to understand the Go structures that cgo gives me, how they map back onto the C structures and why a Go struct that doesn't quite match the cgo output seems to work anyway. I've called out two explicit questions down below. --- The Linux kernel provides a character de