Skip to content

Commit 1d7b92e

Browse files
committed
Project setup
0 parents  commit 1d7b92e

File tree

5 files changed

+97
-0
lines changed

5 files changed

+97
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build

LICENSE

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
Copyright (c) 2020 Manlio Perillo ([email protected]).
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are
6+
met:
7+
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the
13+
distribution.
14+
* Neither the name of Manlio Perillo nor the names of its
15+
contributors may be used to endorse or promote products derived
16+
from this software without specific prior written permission.
17+
18+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Makefile

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright 2019 Manlio Perillo. All rights reserved.
2+
# Use of this source code is governed by a BSD-style
3+
# license that can be found in the LICENSE file.
4+
5+
# A Makefile template for Go projects.
6+
7+
# Exported variable definitions.
8+
export GO111MODULE := on
9+
10+
# Imported variables.
11+
# GOPKG - used to select the target package
12+
13+
# Variable definitions.
14+
BENCHFLAGS := -v
15+
COVERMODE := atomic # atomic is necessary if the -race flag is enabled
16+
TESTFLAGS := -race -v
17+
18+
# Standard rules.
19+
.POSIX:
20+
21+
.PHONY: build bench clean cover github install lint print test test-trace trace vet
22+
23+
# Default rule.
24+
build:
25+
go build -o build ./...
26+
27+
# Custom rules.
28+
bench:
29+
go test ${BENCHFLAGS} -bench=. -benchmem ./...
30+
31+
clean:
32+
go mod tidy
33+
go clean
34+
go clean -i
35+
rm -f build/*
36+
37+
cover:
38+
go tool cover -html=build/coverage.out -o=build/coverage.html
39+
40+
github:
41+
git push --follow-tags -u github master
42+
43+
install:
44+
go install ./...
45+
46+
lint:
47+
golint ./...
48+
49+
print:
50+
goprint -font='"Inconsolata" 10pt/12pt' ${GOPKG} > build/pkg.html
51+
prince -o build/pkg.pdf build/pkg.html
52+
53+
test:
54+
go test ${TESTFLAGS} -covermode=${COVERMODE} \
55+
-coverprofile=build/coverage.out ./...
56+
57+
test-trace:
58+
go test ${TESTFLAGS} -trace=build/trace.out ${GOPKG}
59+
60+
trace:
61+
go tool trace build/trace.out
62+
63+
vet:
64+
go vet ./...

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# gomod-pack [![GoDoc](https://godoc.org/github.com/perillo/gomod-pack?status.svg)](http://godoc.org/github.com/perillo/gomod-pack)

go.mod

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/perillo/gomod-pack
2+
3+
go 1.13

0 commit comments

Comments
 (0)