Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))

.PHONY: all

all: go-format go-vet setup-mongodb-env
all: go-format go-vet go-lint setup-mongodb-env

test: go-format go-vet go-lint
go test -v ./...
setup-mongodb-env:
${ROOT_DIR}/scripts/mongodb/run-mongodb-dev.sh
${ROOT_DIR}/scripts/mongodb/run-mongoexpress.sh
Expand All @@ -19,3 +21,6 @@ go-format:

go-vet:
go vet ./...

go-lint:
golangci-lint run
2 changes: 1 addition & 1 deletion db/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func SetSourceIdentifier(identifier string) bool {
}

// for internal use only, it will also make source identifier in use
func getSourceIdentifier() string {
func GetSourceIdentifier() string {
sourceIdentifierLock.RLock()
defer sourceIdentifierLock.RUnlock()
sourceIdentifierUsed = true
Expand Down
5 changes: 4 additions & 1 deletion scripts/dev-setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ sudo tar -C /usr/local -xzf ${GOLANG_PACKAGE}
rm -rf ${GOLANG_PACKAGE}
echo "export GOPATH=\$HOME/go" >> ~/.bashrc
echo "export PATH=\$PATH:/usr/local/go/bin:\$HOME/go/bin" >> ~/.bashrc
source ~/.bashrc
source ~/.bashrc

# install golang lint cli
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.0.2