Re: [go-nuts] where is GOROOT set?

2022-11-18 Thread pat2...@gmail.com
thanks On Friday, November 18, 2022 at 1:10:40 PM UTC-5 Brian Candler wrote: > You still should have a go.mod. Even if you don't intend to publish your > code anywhere, you give it a module name - anything will do as long as it > meets the syntax requirements. > OK, I can have a go.mod But d

Re: [go-nuts] Re: Go implementation of CLP

2022-11-18 Thread Jason E. Aten
Sorry for not being familiar with the terminology. I thought the search through compressed logs was the most interesting part. Is that included in the "parsing component"? On Fri, Nov 18, 2022 at 1:21 PM david lion wrote: > At the moment we're working on a Go binding around the parsing component

Re: [go-nuts] Is os.File suitable for http.Request.Body when uploading a file using http.Client.Do()?

2022-11-18 Thread Ian Lance Taylor
On Fri, Nov 18, 2022 at 2:49 PM Tan Telephone wrote: > > Is that appropriate? Does os.File meet the requirement "must allow Read to be > called concurrently with Close. In particular, calling Close should unblock a > Read waiting for input"? Yes, os.File meets that requirement. (Note that I/O

[go-nuts] Is os.File suitable for http.Request.Body when uploading a file using http.Client.Do()?

2022-11-18 Thread Tan Telephone
``` // Body is the request's body. // // For client requests, a nil body means the request has no // body, such as a GET request. The HTTP Client's Transport // is responsible for calling the Close method. // // For server requests, the Request Body is always non-nil // but will return EOF immed

Re: [go-nuts] Re: Go implementation of CLP

2022-11-18 Thread david lion
At the moment we're working on a Go binding around the parsing component of CLP. You're right, the current code is all C++, but we'll be moving the parsing component to be standalone and creating a C API for it. Right now, we're only creating bindings for the parsing component since it seems to

Re: [go-nuts] Module weirdness in playground

2022-11-18 Thread Brian Candler
Interesting. But if I install and run goimports locally, it doesn't delete the import - it just rewrites it to assign the package name explicitly. Maybe the playground has a different version of goimports? $ ~/go/bin/goimports -d . diff -u start.go.orig start.go --- start.go.orig 2022-11

Re: [go-nuts] Module weirdness in playground

2022-11-18 Thread Jan Mercl
On Fri, Nov 18, 2022 at 7:15 PM Brian Candler wrote: > This used to work: > https://play.golang.org/p/YQoAu1Iwkor > > But now when I click on "Run", the import path of "example.com/myprog/foo" is > removed, and it fails to compile. > > Any clues as to what's going on? I think the playground use

[go-nuts] Module weirdness in playground

2022-11-18 Thread Brian Candler
This used to work: https://play.golang.org/p/YQoAu1Iwkor But now when I click on "Run", the import path of "example.com/myprog/foo" is removed, and it fails to compile. Any clues as to what's going on? -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] where is GOROOT set?

2022-11-18 Thread Brian Candler
> They are just simple go programs that work like perl or python programs, designed to take work with pipes You still should have a go.mod. Even if you don't intend to publish your code anywhere, you give it a module name - anything will do as long as it meets the syntax requirements. See exam

Re: [go-nuts] where is GOROOT set?

2022-11-18 Thread Ian Lance Taylor
On Fri, Nov 18, 2022 at 6:19 AM pat2...@gmail.com wrote: > > There are really no need for packages or modules for these programs. > They are just simple go programs that work like perl or python programs, > designed to take work with pipes > Some have package names because the source I pulled fro

Re: [go-nuts] where is GOROOT set?

2022-11-18 Thread pat2...@gmail.com
OK, all the source files are in the same directory I did the go mod it didn't work as you typed, but I got it to work I'm pretty sure I don't understand packages and modules. I really an not using any of that, I just have a half dozen go files some with main() and some with tests. I am now getti