Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lmittmann committed Apr 30, 2024
1 parent 13544c7 commit 4fb589a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 28 deletions.
4 changes: 1 addition & 3 deletions params_darwin_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions params_darwin_arm64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 13 additions & 19 deletions params_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,19 @@ var (
func main() {
targets := []*target{
{
BaseURL: solcBaseURL + "linux-amd64/",
Fn: "params_linux_amd64.go",
BuildTarget: "linux && amd64",
MinVersion: "0.5.0",
BaseURL: solcBaseURL + "linux-amd64/",
Fn: "params_linux_amd64.go",
MinVersion: "0.5.0",
},
{
BaseURL: solcBaseURL + "macosx-amd64/",
Fn: "params_darwin_amd64.go",
BuildTarget: "darwin && amd64",
MinVersion: "0.5.0",
BaseURL: solcBaseURL + "macosx-amd64/",
Fn: "params_darwin_amd64.go",
MinVersion: "0.5.0",
},
{
BaseURL: solcBaseURL + "macosx-amd64/",
Fn: "params_darwin_arm64.go",
BuildTarget: "darwin && arm64",
MinVersion: "0.8.24",
BaseURL: solcBaseURL + "macosx-amd64/",
Fn: "params_darwin_arm64.go",
MinVersion: "0.8.24",
},
}

Expand Down Expand Up @@ -97,10 +94,9 @@ func parseVersion(v string) (major, minor, patch int, err error) {
}

type target struct {
BaseURL string
Fn string
BuildTarget string
MinVersion string
BaseURL string
Fn string
MinVersion string
}

type build struct {
Expand All @@ -125,9 +121,7 @@ type model struct {
Builds []*build `json:"builds"`
}

const tmplStr = `// Code generated by go generate; DO NOT EDIT.
//go:build {{ .Target.BuildTarget }}
const tmplStr = `// Code generated by "go generate"; DO NOT EDIT.
package solc
Expand Down
4 changes: 1 addition & 3 deletions params_linux_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4fb589a

Please sign in to comment.