<commit_before>PACKAGES = $(shell go list ./...)
TEST_PACKAGES = $(shell go list ./src/... | grep -v vendor)

.PHONY: build fmt test test-cover-html test-cover-func collect-cover-data

export GO15VENDOREXPERIMENT=1

# Used to populate version variable in main package.
VERSION=$(shell git describe --always --tags --abbre=0)
BUILD_TIME=$(shell date -u +%Y-%m-%d:%H-%M-%S)
GO_LDFLAGS=-ldflags "-X `go list ./src/version`.Version=$(VERSION) -X `go list ./src/version`.BuildTime=$(BUILD_TIME)"

default: build

docker-build:
	docker run --rm -w /go/src/github.com/Dataman-Cloud/swan -e CGO_ENABLED=0 -e GOOS=linux -e GOARCH=amd64  -v $(shell pwd):/go/src/github.com/Dataman-Cloud/swan golang:1.6.3-alpine sh -c "apk update && apk add make && apk add git && make"

build: fmt
	go build ${GO_LDFLAGS} -v -o bin/swan main.go<commit_msg>improve `make docker-build`<commit_after>PACKAGES = $(shell go list ./...)
TEST_PACKAGES = $(shell go list ./src/... | grep -v vendor)

.PHONY: build fmt test test-cover-html test-cover-func collect-cover-data

export GO15VENDOREXPERIMENT=1

# Used to populate version variable in main package.
VERSION=$(shell git describe --always --tags --abbre=0)
BUILD_TIME=$(shell date -u +%Y-%m-%d:%H-%M-%S)
GO_LDFLAGS=-ldflags "-X `go list ./src/version`.Version=$(VERSION) -X `go list ./src/version`.BuildTime=$(BUILD_TIME)"

default: build

docker-build:
	docker run --rm -w /go/src/github.com/Dataman-Cloud/swan -e CGO_ENABLED=0 -e GOOS=linux -e GOARCH=amd64  -v $(shell pwd):/go/src/github.com/Dataman-Cloud/swan golang:1.6.3-alpine sh -c 'go build ${GO_LDFLAGS} -v -o bin/swan main.go' 

build: fmt
	go build ${GO_LDFLAGS} -v -o bin/swan main.go
{'fraction_non_alphanumeric': 0.17115499700777978, 'fraction_numerical': 0.011968880909634948, 'mean_word_length': 3.75, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7667812', 'n_tokens_mistral': 641, 'n_tokens_neox': 619, 'n_words': 171}