Re: [go-nuts] How to cross-compile Go 1.19 compiler for Solaris 11 on Linux

2022-08-31 Thread Shane
I was finally able to compile the bootstrap on Linux (I had to install the missing libc). However, after copying the .tbz file onto my Solaris 11u4 AMD64 machine to build the final Go tools, building fails: $ GOROOT_BOOTSTRAP=/tmp/bootstap-goroot CGO_ENABLED=1 ./all.bash Building Go cmd/dist

[go-nuts] [security] Go 1.19.1 and Go 1.18.6 pre-announcement

2022-08-31 Thread announce
Hello gophers, We plan to issue Go 1.19.1 and Go 1.18.6 on Tuesday, September 6. These minor releases include PRIVATE security fixes to the standard library. Following our security policy, this is the pre-announcement of those releases. Thanks, Damien for the Go team -- You received this

Re: [go-nuts] How long does it take to import packages?

2022-08-31 Thread Wojciech S. Czarnecki
Dnia 2022-08-31, o godz. 00:00:41 ag9920 napisał(a): If you are in windows ecosystem exclude your development areas, including go installation and gocache from antivirus "heuristics". While at last most of AV vendors "discovered" that Go exists and it has its own linker, some dutifully sends

[go-nuts] Gothon Library to simulate useful Python methods

2022-08-31 Thread Andres Fernando Baron
Hi ! A few days ago I wrote about a library that will use the power of generics in go ˆ1.18 to emulate the most common and practical Python methods, such as handling lists, dictionaries, heaps, etc. I put forward a bit of code for the slices and recreate in a generic way the handling of lists

[go-nuts] structured, leveled logging

2022-08-31 Thread 'Jonathan Amsterdam' via golang-nuts
If you're interested in logging, you may want to check out the discussion about a potential new standard library package for structured logging. https://github.com/golang/go/discussions/54763 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] Struct with Interfaces fields as key in maps

2022-08-31 Thread antonio.o...@gmail.com
> This works in general, but your example is flawed. oh, my bad, thanks for the clarification > you'll receive a runtime panic instead of a compile error. yeah, I've received the same feedback offline from one colleague some minutes ago ... it is a bad idea Thanks On Wednesday, 31 August

Re: [go-nuts] How long does it take to import packages?

2022-08-31 Thread 'Michael Pratt' via golang-nuts
Setting GODEBUG=inittrace=1 will log a trace of init function execution, which you can use to determine if init is slow, and if so which packages. e.g., `GODEBUG=inittrace=1 go version` ends with "init main @9.5 ms", indicating that it look 9.5ms to run all init functions. The format is

Re: [go-nuts] Struct with Interfaces fields as key in maps

2022-08-31 Thread burak serdar
On Wed, Aug 31, 2022 at 7:28 AM antonio.o...@gmail.com < antonio.ojea.gar...@gmail.com> wrote: > Hi, > > Based on the documentation: > > "The map key can be any type that is comparable." > "Struct values are comparable if all their fields are comparable. Two > struct values are equal if their

[go-nuts] Struct with Interfaces fields as key in maps

2022-08-31 Thread antonio.o...@gmail.com
Hi, Based on the documentation: "The map key can be any type that is comparable." "Struct values are comparable if all their fields are comparable. Two struct values are equal if their corresponding non-blank fields are equal." "Interface values are comparable. Two interface values are equal if

[go-nuts] Re: How long does it take to import packages?

2022-08-31 Thread Brian Candler
"import" and const calculations are compile-time activities, whereas init() and global var assignment are run-time activities. How does the time to compile your code to an executable, compare to running the tests? If compiling the code is fast but running the tests is slow, that rules out any

Re: [go-nuts] How long does it take to import packages?

2022-08-31 Thread Jan Mercl
On Wed, Aug 31, 2022 at 9:00 AM ag9920 wrote: > Hi, recently I've been trying to make my unit test faster. It seems too much > time were spent on initialization. The "seems" part is a guess or a measurement? How much is "too much time"? > After removing all init() function in relevant

Re: [go-nuts] How long does it take to import packages?

2022-08-31 Thread 'Axel Wagner' via golang-nuts
On Wed, Aug 31, 2022 at 9:01 AM ag9920 wrote: > Hi, recently I've been trying to make my unit test faster. It seems too > much time were spent on initialization. After removing all init() function > in relevant packages. The speed was still very slow.It even takes dozens of > seconds before

[go-nuts] How long does it take to import packages?

2022-08-31 Thread ag9920
Hi, recently I've been trying to make my unit test faster. It seems too much time were spent on initialization. After removing all init() function in relevant packages. The speed was still very slow.It even takes dozens of seconds before entering my real unit test function. So I take a look at