We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59c953c commit 158d7e0Copy full SHA for 158d7e0
cmd/main.go
@@ -0,0 +1,29 @@
1
+package main
2
+
3
+import (
4
+ "os"
5
6
+ "github.com/go-toolsmith/minformat"
7
+)
8
9
+func main() {
10
+ if len(os.Args) != 2 {
11
+ panic("needs 1 argument: file to process")
12
+ }
13
14
+ filename := os.Args[1]
15
16
+ b, err := os.ReadFile(filename)
17
+ if err != nil {
18
+ panic(err)
19
20
21
+ res, err := minformat.Source(b)
22
23
24
25
26
+ if _, err := os.Stdout.Write(res); err != nil {
27
28
29
+}
0 commit comments