Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rucciva committed Aug 23, 2024
1 parent ecce17e commit 43f68e9
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 4 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,16 @@ Base64 Encode/Decode multiple files.
go run -mod=mod github.com/telkomindonesia/b64f decode
```
## Tips
You can use `makefie` to make the command simpler, for example:
```makefile
b64f: mode ?= "decode"
b64f:
go run -mod=mod github.com/telkomindonesia/b64f $(mode)
```

which can then be used using `make b64f` or `make b64f mode=encode`

see [testdata](./testdata/) folder for example.
4 changes: 2 additions & 2 deletions testdata/.b64f
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
a/bb/ccc/*
a/bb/f
a/bb/**/*.ext
a/*
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions testdata/makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
B64F_MODE ?= "decode"
b64f: mode ?= "decode"
b64f:
go run .. $(B64F_MODE)
go run .. $(mode)

0 comments on commit 43f68e9

Please sign in to comment.