[go-nuts] Re: No downloadable go1.18.1 version for darwin

2022-04-13 Thread Yulrizka
Appologize, should've read the release thread, it's a known issue https://github.com/golang/go/issues/52317 On Wednesday, April 13, 2022 at 4:33:44 PM UTC+2 Yulrizka wrote: > I see from release history that go.1.18.1 was released yesterday. > > But it seems that the dow

[go-nuts] No downloadable go1.18.1 version for darwin

2022-04-13 Thread Yulrizka
I see from release history that go.1.18.1 was released yesterday. But it seems that the download page does not contain package for darwin like previous version This command also failed go1.18.1 download go1.18.1: download failed: no binary release of go1.18.1 for darwin/amd64 at https://dl.goo

[go-nuts] Acessing struct field in generic

2022-02-21 Thread Yulrizka
Hi All, I'm just trying generics and bump into this. # command-line-arguments ./main.go:21:12: m.x undefined (type T has no field or method x) this is the source code package main import "fmt" type A struct { x int } type B struct { x int y int } type Model interface { A | B } func Reduce

[go-nuts] Re: Why does for-range behaves differently depend on the slice's struc size?

2020-04-24 Thread Yulrizka
, Tamás Gulácsi wrote: > > 2020. április 24., péntek 14:26:08 UTC+2 időpontban Yulrizka a következőt > írta: >> >> Hello, >> >> >> I was playing around with this code >> >> main_var.go >> package main >> >> func main() { &

[go-nuts] Why does for-range behaves differently depend on the slice's struc size?

2020-04-24 Thread Yulrizka
Hello, I was playing around with this code main_var.go package main func main() { const size = 100 slice := make([]SomeStruct, size) for _, s := range slice { // line 7 _ = s } } type_small.go package main type SomeStruct struct { ID0 int64 ID1 int64

[go-nuts] using ast ang go type to rewrite method

2019-10-05 Thread Yulrizka
hi For an experiment, I'm trying to rewrite a method call to use a different package. for example package main import "github.com/pkg/errors" func main() { err := errors.New("original error") errors.Wrap(err, "wrapped error") } into package main import ( "errors" "fmt" )

Re: [go-nuts] Re: Is it safe to run go build in parallel?

2018-10-11 Thread Yulrizka
Ok, to give some update apparently our Makefile uses `build -i` where it tries to install package dependency. This explains the conflicted `.a` files. It was there before GOCACHE to speed up `go build` Thanks for the help! On Wednesday, October 10, 2018 at 9:40:28 PM UTC+2, Yulrizka wrote

Re: [go-nuts] Re: Is it safe to run go build in parallel?

2018-10-10 Thread Yulrizka
in `pkg/mod`. > > And I thought that meant you were using modules. > > Discussion in https://github.com/golang/go/issues/26677 says that the > build cache is explicitly safe, but if you have a reproducer that shows > otherwise, that's probably worthy of its own issue. >

[go-nuts] Re: Is it safe to run go build in parallel?

2018-10-01 Thread Yulrizka
t;can't run go builds > concurrently if they download modules". > > In that issue, Russ says: > > There is a plan to make downloading of modules by parallel go commands safe > but we haven't done that yet. > > On Monday, October 1, 2018 at 8:43:00 AM UTC-7, Yulrizka wrote

[go-nuts] Is it safe to run go build in parallel?

2018-10-01 Thread Yulrizka
Hi, Recently, I played around with our Jenkins pipeline. In the new set-up, I build multiple packages in parallel. This step executes "go build" for each of the services that we have at the same time. One thing I also change is that for each service, it uses the same GOPATH. Sometimes, I see fa

Re: [go-nuts] go module for library developer workflow

2018-09-05 Thread Yulrizka
Thank you, that seems to work On Tuesday, September 4, 2018 at 5:31:06 PM UTC+2, Sam Whited wrote: > > On Tue, Sep 4, 2018, at 09:58, Yulrizka wrote: > > What is the recommended workflow to easily develop new functionality for > > lib 'a'? > > Add a replace d

[go-nuts] go module for library developer workflow

2018-09-04 Thread Yulrizka
Hello, I'm playing around with go module and stumble upon an interesting use-case. # use-case number 1 Let say for example: * I'm a maintainer of a library `github.com/my/a`. with version v0.1.0 * I also have an app (with main.go) on 'github.com/my/b' which uses the 'a' library. both have g

[go-nuts] Why array [10485761]bytes (10MB) moved to the heap?

2018-04-13 Thread Yulrizka
I'm playing around with slices. Found that slice of bytes with the size more than 10485760 is moved to the heap. package main import ( "fmt" "runtime/debug" "time" ) // run with escape analysis // go run -gcflags '-m -l' main.go func main() { a() fmt.Println("after a returned") debug

[go-nuts] Do we need to close response.Body before closing it?

2017-07-05 Thread Yulrizka
Hi I was reading this thread https://stackoverflow.com/questions/17948827/reusing-http-connections-in-golang and found this comment one interesting note is that the read step appears to be necessary and > sufficient. > The read-step alone will return the connection to the pool, but the close

Re: [go-nuts] idea behind error interface and github.com/pkg/errors

2016-09-23 Thread Ahmy Yulrizka
error message. > Especially if you prefer the way how Java error messages look. > > I don't. > > On Fri, Sep 23, 2016, 08:24 Yulrizka wrote: > >> Hello >> >> I was watching Dave Cheney's presentation in gopher conf and was >> fascinated. >> >>

[go-nuts] idea behind error interface and github.com/pkg/errors

2016-09-22 Thread Yulrizka
Hello I was watching Dave Cheney's presentation in gopher conf and was fascinated. (btw he also wrote a blog post here http://dave.cheney.net/2016/04/27/dont-just-check-errors-handle-them-gracefully) In some case, I can relate. For example when I'm working on quite large codebase, Sometimes I

[go-nuts] Re: Understanding go routine heap

2016-08-23 Thread Yulrizka
Ah sorry I've missed that in the email. On Tuesday, August 23, 2016 at 12:48:04 PM UTC+2, T L wrote: > > > > On Tuesday, August 23, 2016 at 6:14:19 PM UTC+8, Yulrizka wrote: >> >> Thank you for the explanation and the code sample >> >> But the case her

[go-nuts] Re: Understanding go routine heap

2016-08-23 Thread Yulrizka
at 2:29:41 AM UTC-4, Yulrizka wrote: >> >> Dear gophers >> >> I have discussion with my colleague about this code >> >> >> func process() *foo { >> var result *foo >> >> var wg sync.WaitGroup >>

[go-nuts] Understanding go routine heap

2016-08-19 Thread Yulrizka
Dear gophers I have discussion with my colleague about this code func process() *foo { var result *foo var wg sync.WaitGroup wg.Add(1) go func() { defer wg.Done() result = &foo{1} }() wg.Wait() return result } He argues that this is heap race condi