Skip to content

Commit be090e4

Browse files
authored
chore(codegen): process .abi.json files (#5)
1 parent d58bc70 commit be090e4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

codegen/generate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ func GenerateBindings(path string, outdir string, config *BindingsConfig) error
4040
return nil
4141
}
4242

43-
if matched, err := filepath.Match("*.abi", filepath.Base(path)); err != nil {
43+
if matched, err := filepath.Match("*.abi.json", filepath.Base(path)); err != nil {
4444
return err
4545
} else if matched {
4646
dir, fn := filepath.Split(path)
47-
typ := strings.TrimSuffix(fn, filepath.Ext(fn))
47+
typ := strings.TrimSuffix(fn, ".abi.json")
4848
name := strings.ToLower(typ)
4949
pkg := strings.ToLower(filepath.Base(outdir))
5050

example/bindings/example.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)