Skip to content

Commit

Permalink
fix: README
Browse files Browse the repository at this point in the history
  • Loading branch information
Dokiys committed May 11, 2024
1 parent b337f2f commit 949804b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,42 @@ usage: gmfs [OPTION] [GO_FILES]
Set int convert type, only allow [32,64]. (default 64)
-r string
Regexp match struct name. (default ".*")
-f string
Specifies files(separate multiple values with spaces).
-v,--version Show version info and exit.
```
If under macOS copy struct name and run `gmfs -s=$(pbpaste) $(ls | grep ".go") | pbcopy` at go file path will copy the result to clipboard.

![aa](gmfs.gif)
```bash
echo '// Item Comment 1
/*
Item Comment 1
*/
// Item Comment 1
type Item struct {
// Item ItemId Comment 3
// Item ItemId Comment 2
ItemId int // Item ItemId Comment 1
Name string
Duration time.Duration
CreatedAt time.Time
}' | gmfs

// Item Comment 1
/*
Item Comment 1
*/
// Item Comment 1
message Item {
// Item ItemId Comment 1
int64 item_id = 1;

string name = 2;

Duration duration = 3;

google.protobuf.Timestamp created_at = 4;
}
```

If under macOS copy struct name and run `gmfs -r="UserInfo" -f="user.go" | pbcopy` at go file path will copy the result to clipboard.
Binary file removed gmfs.gif
Binary file not shown.

0 comments on commit 949804b

Please sign in to comment.