modernize: run gopls modernize to bring up to 1.25 (#2920)

This commit is contained in:
Kristoffer Dalby 2025-12-01 19:40:25 +01:00 committed by GitHub
parent bfcd9d261d
commit eec196d200
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 78 additions and 116 deletions

View file

@ -130,7 +130,7 @@ func newHeadscaleCLIWithConfig() (context.Context, v1.HeadscaleServiceClient, *g
return ctx, client, conn, cancel
}
func output(result interface{}, override string, outputFormat string) string {
func output(result any, override string, outputFormat string) string {
var jsonBytes []byte
var err error
switch outputFormat {
@ -158,7 +158,7 @@ func output(result interface{}, override string, outputFormat string) string {
}
// SuccessOutput prints the result to stdout and exits with status code 0.
func SuccessOutput(result interface{}, override string, outputFormat string) {
func SuccessOutput(result any, override string, outputFormat string) {
fmt.Println(output(result, override, outputFormat))
os.Exit(0)
}