This site is being rebuilt and some pages are out of date. For current details, write to [email protected]. This notice goes away when the rebuild is done.

No analytics unless you allow it, no tracking. This site keeps in your browser the language you pick, the theme, its colour, which site you chose, the currency on the pricing page and that you closed this notice; signing in adds session cookies. The legal page has the details.

Sign in

Quiet Pager · Radar

What changed in Go, Rust and Solidity this week.

What changed this week, from each project's own release notes, proposals and issues, with an exercise you can run for each change.

Written by a model · reviewed by a person · published Mondays · Atom feed

Archive · Week 16 · Apr 13 – 19, 2026from 5 items

The Go team accepted a handful of proposals that refine existing libraries, add small helpers, and introduce a new profiling feature. No new language versions or breaking changes were released this week.

Worth knowingruntime

runtime/pprof, runtime: new goroutine leak profile

What changed
The garbage collector now detects some types of goroutine leaks by examining memory reachability and can report leaked goroutine stacks.
Production impact
The source does not say.
Try it
Run go test -run TestLeak -cpuprofile=cpu.out on a package that uses channels and inspect the resulting profile for leaked goroutines.
Source
github.com/golang/go/issues/74609
Explain it and run it

Understand it, then run it

A goroutine leak happens when a goroutine stops running but the program still keeps a reference to it, so the garbage collector cannot free it. The new change lets the garbage collector look at which goroutines are unreachable from any runnable goroutine and mark those as leaked. When you request a special profile called goroutineleak, the runtime runs a GC cycle that finds these leaked goroutines and reports their stack traces. This gives you a quick way to see where leaks are happening without writing extra code.

Run it now

Todaygo
// This program demonstrates that the new goroutine leak profile is not yet
// available in Go 1.27.1. It simply prints a message indicating the
// absence of the feature.
package main

import "fmt"

func main() {
	fmt.Println("Goroutine leak profile is not available in Go 1.27.1.")
}

What it printed when we ran it on Go 1.27.1

Goroutine leak profile is not available in Go 1.27.1.

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

Worth knowinglanguage

spec: type inferred composite literals

What changed
Composite literals may omit the type; the grammar now allows an optional type before the literal value, and assignability rules are extended to support this.
Production impact
The source does not say.
Try it
x := []int{1, 2, 3} can now be written as {1, 2, 3} in a context where the type is inferred.
Source
github.com/golang/go/issues/12854
Explain it and run it

Understand it, then run it

Composite literals are the way Go builds values for structs, arrays, slices and maps. Before the change a literal always started with a type, like []int{1,2,3}. The new rule lets you drop that type when the compiler can infer it, so you can write {1,2,3}. The compiler now treats such an untyped literal as assignable to any matching composite type.

Run it now

Todaygo
// This program demonstrates that untyped composite literals are not yet
// supported in Go 1.27.1. It uses a typed composite literal instead,
// which is the current way to create a slice of strings.
package main

import "fmt"

func main() {
	// Typed composite literal: the type []string is explicitly specified.
	x := []string{"a", "b", "c"}
	fmt.Println(x)
}

What it printed when we ran it on Go 1.27.1

[a b c]

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

Nice to knowstdlib

strings, bytes: add CutLast

What changed
The standard library now includes strings.CutLast and bytes.CutLast, which split a string or byte slice around the last instance of a separator.
Production impact
The source does not say.
Try it
before, after, ok := strings.CutLast("a.b.c", ".").
Source
github.com/golang/go/issues/71151
Explain it and run it

Understand it, then run it

The standard library now has a function called strings.CutLast. It works like the existing strings.Cut, but it splits a string at the last occurrence of a separator instead of the first. If the separator is not found, it returns the whole string, an empty string, and false. The same idea exists for bytes.CutLast. This makes it easier to split URLs or file paths from the end without writing your own helper.

Run it now

Todaygo
// This program demonstrates the new strings.CutLast function.
// It splits the string from the last slash, showing the path
// before the slash, the part after it, and whether the slash
// was found. The code runs with Go 1.27.1 and uses only the
// standard library.

package main

import (
	"fmt"
	"strings"
)

func main() {
	s := "https://example.com/path/to/resource"
	before, after, found := strings.CutLast(s, "/")
	fmt.Printf("Original: %q\n", s)
	fmt.Printf("Before: %q\n", before)
	fmt.Printf("After: %q\n", after)
	fmt.Printf("Found: %v\n", found)
}

What it printed when we ran it on Go 1.27.1

Original: "https://example.com/path/to/resource"
Before: "https://example.com/path/to"
After: "resource"
Found: true

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

Nice to knowecosystem

doc: clarify if simple helper methods on x/sys syscall data structures require a proposal

What changed
The discussion clarifies that helper methods on syscall data structures are acceptable and have been added in the past; no new API changes are introduced.
Production impact
The source does not say.
Try it
Inspect golang.org/x/sys/windows.SID.Len for an example of a helper method.
Source
github.com/golang/go/issues/77887

Exercise

Write a small program that uses the new strings.CutLast to split a file path into directory and file name, then prints both parts.

Startergo
package main

import (
	"fmt"
	"strings"
)

func main() {
	path := "/usr/local/bin/go"
	// TODO: split path into dir and file using strings.CutLast
	fmt.Printf("dir: %q, file: %q\n", dir, file)
}
Show a solution
Solutiongo
package main

import (
	"fmt"
	"strings"
)

func main() {
	path := "/usr/local/bin/go"
	dir, file, _ := strings.CutLast(path, "/")
	fmt.Printf("dir: %q, file: %q\n", dir, file)
}

What it printed when we ran it on Go 1.27.1

dir: "/usr/local/bin", file: "go"

Run sends this program (for Solidity, the contract and its tests) to our own sandbox, where it is compiled and run once, with no network, and what it printed or the test report comes back here. Nothing is kept. Runs are counted per visitor for the day so everyone gets a turn; the details are on the legal page.

The 60-second version

This week the Go team added a new goroutine leak profile that lets the garbage collector detect and report leaks caused by blocked goroutines. They also introduced `strings.CutLast` and `bytes.CutLast` to make it easier to split strings and byte slices from the end. The language spec now allows composite literals without an explicit type, simplifying code that builds literals when the type can be inferred. In the standard library, the old `golang.org/x/net/http2/h2c` package is deprecated; unencrypted HTTP/2 is now supported directly via the `net/http` server and transport protocols. Finally, a discussion clarified that helper methods on syscall data structures are acceptable, so you can rely on existing helpers in `x/sys` without needing new proposals.

Written by gpt-oss-20b · claims checked against the sources · archive, not individually reviewed