Skip to content

Commit

Permalink
Minor fixes (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
liranbg authored Mar 30, 2020
1 parent cfc0cc4 commit 348b0cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: go mod download

- name: Build
run: make bin
run: make ${{ matrix.platform }}

- name: Upload
id: upload-release-asset
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ GO_BUILD_COMMAND=go build -i -installsuffix cgo -ldflags="-s -w -X main.version=

.PHONY: all lint bin clean

all: lint bin ## Lint and build binaries
@echo Done.

linux: $(LINUX_BIN_NAME) ## Build binary for linux

Expand Down Expand Up @@ -50,10 +52,8 @@ lint: ## Lint
--exclude="comment on" \
--exclude="error should be the last" \
--exclude="should have comment" \
./pkg/...
@echo Done.

all: lint bin ## Lint and build binaries
./pkg/... \
./cmd/...
@echo Done.

clean: ## Clean previously built binaries
Expand Down
4 changes: 2 additions & 2 deletions pkg/loggerus/jsonformatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"strings"

"github.com/fatih/color"
"github.com/nuclio/errors"
"github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -91,9 +92,8 @@ func (f *JSONFormatter) Format(entry *logrus.Entry) ([]byte, error) {
data["ctx"] = ctx

serialized, err := json.Marshal(data)

if err != nil {
return nil, fmt.Errorf("failed to marshal fields to JSON, %v", err)
return nil, errors.Wrap(err, "Failed to marshal fields to JSON")
}

// we append the rune (byte) '\n' rather than the string "\n"
Expand Down

0 comments on commit 348b0cf

Please sign in to comment.