Skip to content

Commit

Permalink
rewrite generation of go_std_tables.go from Bash to Go
Browse files Browse the repository at this point in the history
This makes it portable and easier to maintain for any Go developers.
I also want to improve its logic, which would have been harder in shell.
  • Loading branch information
mvdan committed Aug 27, 2024
1 parent a99fbcb commit 2259abb
Show file tree
Hide file tree
Showing 4 changed files with 203 additions and 84 deletions.
40 changes: 20 additions & 20 deletions go_std_tables.go

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

63 changes: 0 additions & 63 deletions scripts/gen-go-std-tables.sh

This file was deleted.

182 changes: 182 additions & 0 deletions scripts/gen_go_std_tables.go

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

2 changes: 1 addition & 1 deletion shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"golang.org/x/mod/module"
)

//go:generate ./scripts/gen-go-std-tables.sh
//go:generate go run scripts/gen_go_std_tables.go

// sharedCacheType is shared as a read-only cache between the many garble toolexec
// sub-processes.
Expand Down

0 comments on commit 2259abb

Please sign in to comment.