{"record":{"id":"1206dffbcf0e12da","repo":"goreleaser/goreleaser","slug":"invalid-goos-s","errorCode":null,"errorMessage":"invalid goos: %s","messagePattern":"invalid goos: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/builders/golang/targets.go","lineNumber":115,"sourceCode":"\t\t\"GOMIPS=\" + t.Gomips,\n\t\t\"GOMIPS64=\" + t.Gomips,\n\t\t\"GOPPC64=\" + t.Goppc64,\n\t\t\"GORISCV64=\" + t.Goriscv64,\n\t}\n}\n\nfunc listTargets(build config.Build) ([]string, error) {\n\t//nolint:prealloc\n\tvar targets []Target\n\t//nolint:prealloc\n\tvar result []string\n\tbuilt, err := allBuildTargets(build)\n\tif err != nil {\n\t\treturn result, err\n\t}\n\tfor _, target := range built {\n\t\tif !slices.Contains(validGoos, target.Goos) {\n\t\t\treturn result, fmt.Errorf(\"invalid goos: %s\", target.Goos)\n\t\t}\n\t\tif !slices.Contains(validGoarch, target.Goarch) {\n\t\t\treturn result, fmt.Errorf(\"invalid goarch: %s\", target.Goarch)\n\t\t}\n\t\tif target.Goamd64 != \"\" && !slices.Contains(validGoamd64, target.Goamd64) {\n\t\t\treturn result, fmt.Errorf(\"invalid goamd64: %s\", target.Goamd64)\n\t\t}\n\t\tif target.Go386 != \"\" && !slices.Contains(validGo386, target.Go386) {\n\t\t\treturn result, fmt.Errorf(\"invalid go386: %s\", target.Go386)\n\t\t}\n\t\tif target.Goarm64 != \"\" && !validGoarm64.MatchString(target.Goarm64) {\n\t\t\treturn result, fmt.Errorf(\"invalid goarm64: %s\", target.Goarm64)\n\t\t}\n\t\tif target.Gomips != \"\" && !slices.Contains(validGomips, target.Gomips) {\n\t\t\treturn result, fmt.Errorf(\"invalid gomips: %s\", target.Gomips)\n\t\t}\n\t\tif target.Goppc64 != \"\" && !slices.Contains(validGoppc64, target.Goppc64) {\n\t\t\treturn result, fmt.Errorf(\"invalid goppc64: %s\", target.Goppc64)","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/goreleaser/goreleaser/blob/f5edd7395693c0c6b501dc722d445d2e86af854d/internal/builders/golang/targets.go#L97-L133","documentation":"listTargets validates every computed build target's GOOS against the list of valid Go operating systems (validGoos). This error means a target's goos value is not a real Go-supported OS, so the build would fail later. It is a configuration validation error thrown early by the golang builder.","triggerScenarios":"Setting an unknown `goos` in a build's targets/overrides (e.g. a typo like `goos: linuxs` or `macos` instead of `darwin`) so the resolved target contains an invalid GOOS.","commonSituations":"Typos in .goreleaser.yaml goos lists; using an OS name that Go does not support (e.g. `windowsphone`, `ios` misuse); copy-pasting OS names from other tooling with different naming conventions.","solutions":["Fix the `goos` entries in the build config, using valid values: aix, android, darwin, dragonfly, freebsd, illumos, ios, js, linux, netbsd, openbsd, plan9, solaris, wasip1, windows","Run `go tool dist list` to see all valid GOOS/GOARCH pairs","Check for typos (e.g. `linuxs` → `linux`, `macos` → `darwin`)","Run `goreleaser check` to validate the config before releasing"],"exampleFix":"// .goreleaser.yaml\n// before\nbuilds:\n  - goos: [macos, linux]\n// after\nbuilds:\n  - goos: [darwin, linux]","handlingStrategy":"validation","validationCode":"var validGoos = map[string]bool{\n    \"aix\": true, \"android\": true, \"darwin\": true, \"dragonfly\": true,\n    \"freebsd\": true, \"illumos\": true, \"ios\": true, \"js\": true,\n    \"linux\": true, \"netbsd\": true, \"openbsd\": true, \"plan9\": true,\n    \"solaris\": true, \"wasip1\": true, \"windows\": true,\n}\nfor _, goos := range cfg.Builds[0].Goos {\n    if !validGoos[goos] {\n        return fmt.Errorf(\"invalid goos %q\", goos)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate the config with `goreleaser check` before releasing","Use `go tool dist list` as the source of truth for GOOS names","Remember macOS is `darwin` in Go, not `macos`","Keep goos lists in one shared config to avoid copy-paste drift"],"tags":["go","config","validation","goos"],"backgroundTag":"invalid-go-target-value","analyzedSha":"f5edd7395693c0c6b501dc722d445d2e86af854d","analyzedAt":"2026-09-05T09:57:18.807Z","contentChangedAt":"2026-09-05T09:57:18.807Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}