Skip to content

Commit

Permalink
chore(codegen): process .abi.json files (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
crusyn authored Mar 18, 2022
1 parent d58bc70 commit be090e4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions codegen/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ func GenerateBindings(path string, outdir string, config *BindingsConfig) error
return nil
}

if matched, err := filepath.Match("*.abi", filepath.Base(path)); err != nil {
if matched, err := filepath.Match("*.abi.json", filepath.Base(path)); err != nil {
return err
} else if matched {
dir, fn := filepath.Split(path)
typ := strings.TrimSuffix(fn, filepath.Ext(fn))
typ := strings.TrimSuffix(fn, ".abi.json")
name := strings.ToLower(typ)
pkg := strings.ToLower(filepath.Base(outdir))

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion example/bindings/example.go

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

0 comments on commit be090e4

Please sign in to comment.