Skip to content

Commit

Permalink
fix(bindata): always use platform constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
steebchen committed Feb 8, 2023
1 parent dcb9922 commit e0bd2ab
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions binaries/bindata/bindata.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,12 @@ func WriteFile(name, pkg, platform, from, to string) error {
}

func writeHeader(w io.Writer, pkg, name, platform string) error {
var constraints string
if platform == "linux" {
constraints = "// +build linux\n"
}

_, err := fmt.Fprintf(w, `// Code generated by Prisma Client Go. DO NOT EDIT.
//nolint
// +build !codeanalysis
// +build !prisma_ignore
%s
// +build %s
package %s
import (
Expand All @@ -51,7 +47,7 @@ import (
func init() {
unpack.Unpack(data, "%s", "%s")
}
`, constraints, pkg, name, binaries.EngineVersion)
`, platform, pkg, name, binaries.EngineVersion)
return err
}

Expand Down

0 comments on commit e0bd2ab

Please sign in to comment.