SIGN IN SIGN UP
juanfont / headscale UNCLAIMED

An open source, self-hosted implementation of the Tailscale control server

0 0 43 Go

db: remove unused SetApprovedRoutes and SetTags helpers

Both helpers existed to write the literal "[]" when clearing a slice
column — a workaround for GORM's struct-Updates skipping nil slices.
The State path goes exclusively through persistNodeToDB, which is now
correct end-to-end thanks to the named IsZero slice types, so the
helpers are dead in production. The remaining callers were tests.

TestSetTags is dropped — TestSetTags_* in hscontrol/grpcv1_test.go
already covers the State path that production uses. TestAutoApproveRoutes
now writes routes via DB.Save on the loaded node, which is the path
gRPC SetApprovedRoutes drives in production.

Updates #3110
K
Kristoffer Dalby committed
af7e7a45604dd7fe5e0c64d5e2c907a3108c7c36
Parent: b1196ba