File tree 4 files changed +15
-7
lines changed
4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 1
1
.checkpoint
2
2
.checkpoint.idx
3
3
bin /
4
- * .csv.gz
4
+ * .csv.gz
5
+ .vscode /
Original file line number Diff line number Diff line change
1
+ {
2
+ "go.inferGopath" : false
3
+ }
Original file line number Diff line number Diff line change 1
- PROJECT_NAME :=korgi
1
+ PROJECT_NAME: =korgi
2
2
GOFILES: =$(shell find . -name '* .go' | grep -v -E '(./vendor) ')
3
-
3
+ OS: ="$(shell uname | tr '[:upper:]' '[:lower:]') "
4
+ ARCH: =amd64
5
+
4
6
run :
5
7
go run main.go
6
8
7
9
all : clean check bin
8
10
9
-
10
11
bin : $(GOFILES )
11
- mkdir -p bin/linux /
12
- GOOS=linux GOARCH=amd64 go build -a -tags musl -ldflags " $( LDFLAGS) " -o bin/linux /korgi main.go
12
+ mkdir -p bin/${OS} /
13
+ GOOS=${OS} GOARCH=${ARCH} go build -a -tags musl -ldflags " $( LDFLAGS) " -o bin/${OS} /korgi main.go
13
14
14
15
gofmt :
15
16
gofmt -w -s pkg/
16
17
gofmt -w -s cmd/
17
18
18
19
test :
19
- GOOS=linux GOARCH=amd64 go test ./...
20
+ GOOS=${OS} GOARCH=${ARCH} go test ./...
20
21
21
22
check :
22
23
@find . -name vendor -prune -o -name ' *.go' -exec gofmt -s -d {} +
Original file line number Diff line number Diff line change @@ -31,6 +31,9 @@ type ExecLine struct {
31
31
func consume (wg * sync.WaitGroup , r io.Reader , logHook func (string )) {
32
32
defer wg .Done ()
33
33
s := bufio .NewScanner (r )
34
+ buffer := make ([]byte , 0 , 1024 * 1024 )
35
+ s .Buffer (buffer , 1024 * 1024 )
36
+
34
37
for s .Scan () {
35
38
line := s .Text ()
36
39
if line != "" {
You can’t perform that action at this time.
0 commit comments