| 1 | GoTalks 23.09.2025 | |
| 2 | QR code | |
| 3 | How to reach us | |
| 4 | Go News - September 2025 | |
| 5 | GopherCon UK 2025 | |
| 6 | Go Developer Survey 2025 | |
| 7 | Go 1.25 | |
| 8 | Container-aware `GOMAXPROCS` | |
| 9 | New experimental garbage collector | |
| 10 | testing/synctest package | |
| 11 | experimental encoding/json/v2 | |
| 26 | sync.WaitGroup | |
| 27 | go mod - ignore | |
| 28 | Root | |
| 29 | other |



GOMAXPROCSThe default behavior of the GOMAXPROCS has changed.
GOMAXPROCS defaults to runtime.NumCPU.GOMAXPROCSdisabled if GOMAXPROCS is set manually
GOMAXPROCS environment variableruntime.GOMAXPROCS

10—40% reduction in garbage collection overhead in real-world programs that heavily use the garbage collector.

bubble. Within the bubble, time is virtualized
func TestWait(t *testing.T) {
synctest.Test(t, func(t *testing.T) {
x := 0
go func() {
x = 1
time.Sleep(time.Second)
// ...
}()
synctest.Wait()
})
}


new packages are available:
encoding/json/v2encoding/json/jsontextwhen the “jsonv2” GOEXPERIMENT is enabled encoding/json package uses the new JSON implementation
encoding performance is at parity between the implementations
decoding is substantially faster in the new one


func Marshal(in any, opts ...Options) (out []byte, err error)
func MarshalWrite(out io.Writer, in any, opts ...Options) error
func MarshalEncode(out *jsontext.Encoder, in any, opts ...Options) error
func Unmarshal(in []byte, out any, opts ...Options) error
func UnmarshalRead(in io.Reader, out any, opts ...Options) error
func UnmarshalDecode(in *jsontext.Decoder, out any, opts ...Options) error


MarshalToFunc
boolMarshaler := json.MarshalToFunc(
func(enc *jsontext.Encoder, val bool) error {
if val {
return enc.WriteToken(jsontext.String("enabled"))
}
return enc.WriteToken(jsontext.String("disabled"))
},
)
data, err := json.Marshal(vals, json.WithMarshalers(boolMarshaler))


MarshalToFunc
boolStrMarshaler := json.MarshalToFunc(
func(enc *jsontext.Encoder, val string) error {
if val == "enabled" || val == "true" {
return enc.WriteToken(jsontext.String("true"))
}
if val == "disabled" || val == "false" {
return enc.WriteToken(jsontext.String("false"))
}
return json.SkipFunc
},
)


type Age struct {
DOB time.Time `json:"dob,format:DateOnly"`
}
a := Age{
DOB: time.Date(
2025, 9, 23, 18, 35, 0, 0, time.UTC),
}
b, err := json.Marshal(a)
fmt.Println(string(b))


type Image struct {
Data []byte `json:"data"`
}
img := Image{
Data: []byte{0x01, 0x02, 0x03, 0x04, 0x05},
}


type ImageArray struct {
Data []byte `json:"data,format:array"`
}
b, err := json.Marshal(ImageArray{
Data: img.Data,
})
fmt.Println(string(b))
if err != nil {
fmt.Println(err)
}


type ImageBase64 struct {
Data []byte `json:"data,format:base64"`
}
b, err := json.Marshal(ImageBase64{
Data: img.Data,
})
fmt.Println(string(b))
if err != nil {
fmt.Println(err)
}


type ImageHex struct {
Data []byte `json:"data,format:hex"`
}
b, err := json.Marshal(ImageHex{
Data: img.Data,
})
fmt.Println(string(b))
if err != nil {
fmt.Println(err)
}


type Data struct {
List []int `json:"list"`
Map map[string]int `json:"map"`
}
b, err := json.Marshal(d)
fmt.Println(string(b))
if err != nil {
fmt.Println(err)
}


type Data struct {
List []int `json:"list"`
Map map[string]int `json:"map"`
}
b, err := json.Marshal(d,
json.FormatNilSliceAsNull(true),
json.FormatNilMapAsNull(true),
)
fmt.Println(string(b))


type Person struct {
Name string `json:"name"`
AttendingMeetups bool
// Collect all unknown Person fields
Data map[string]any `json:",unknown"`
}
b, err := json.Marshal(person,
jsontext.Multiline(true),
)
fmt.Println(string(b))


type Durations struct {
A time.Duration `json:"dob,format:units"`
B time.Duration `json:"time,format:sec"`
C time.Duration `json:"time,format:nano"`
C time.Duration `json:"time,format:iso8601"`
}


type Age struct {
DOB time.Time `json:"dob ,format:DateOnly"`
Time time.Time `json:"time ,format:TimeOnly"`
DateTime time.Time `json:"datetime,format:2006/01/02 15:04"`
RFC time.Time `json:"datetime,format:RFC3339"`
}


type Data struct {
List1 []int `json:"list,format:emitnull"`
List2 []int `json:"list,format:emitnull"`
Map1 map[string]int `json:"map,format:emitempty"`
Map2 map[string]int `json:"map,format:emitempty"`
}


wg.Add(1)
go func() {
defer wg.Done()
// code to run
}()
wg.Go(func() {
// code to run
})
wg.Wait()


ignore (
./ui/node_modules
static
)
go test ./...
go install ./...


os.OpenInRoot(dir, name)
os.Root(dir)


