[go-nuts] Testing custom error type (error type in struct)

2022-09-01 Thread Bagas Sanjaya
Hi, I would like check if a dummy function returns the desired error. To do this, I put desired error type on test cases struct (the error field is required in the struct). On test-error.go, I have: ``` package tester import ( "fmt" ) type eTest struct { whatstring } func

[go-nuts] LD_LIBRARY_PATH is required when bootstrapping Go with gccgo (non-standard location)

2021-05-23 Thread Bagas Sanjaya
Hi, Today I have built GCC 11.1.0 for use to bootstrap Go using gccgo. I installed GCC to non-standard path, that is inside my home directory (~/.ct-ng/tools/gcc-11.1.10) (sorry for typo when building GCC, I meant gcc-11.1.0). `gcc -v` gave: COLLECT_GCC=/home/bagas/.ct-ng/tools/gcc-11.1.10/bin

Re: [go-nuts] time.Format with "Month Year" format incorrectly displayed

2021-05-05 Thread Bagas Sanjaya
On 06/05/21 04.37, Ian Lance Taylor wrote: > You wrote 2009 where you need to write 2006. Ian Thanks. Wouldn't it possible to define arbitrary reference time and format it according to what it would like? -- An old man doll... just what I always wanted! - Clara -- You received this message

[go-nuts] time.Format with "Month Year" format incorrectly displayed

2021-05-05 Thread Bagas Sanjaya
Hi, I need to display date in "month year" format, for example "August 2018". So I had this minimal reproducible code (excluding package name and import statements): ``` func main() { target := TargetDate(8) fmt.Println("Target month is ", target.Format("January 2009")) } //