Skip to content

Commit e050eac

Browse files
committed
Initial release
1 parent ec96837 commit e050eac

File tree

13 files changed

+410
-1
lines changed

13 files changed

+410
-1
lines changed

.gitignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
dist
2+
3+
# Created by .ignore support plugin (hsz.mobi)
4+
### JetBrains template
5+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
6+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
7+
8+
# User-specific stuff
9+
.idea/**/workspace.xml
10+
.idea/**/tasks.xml
11+
.idea/**/usage.statistics.xml
12+
.idea/**/dictionaries
13+
.idea/**/shelf
14+
15+
# Sensitive or high-churn files
16+
.idea/**/dataSources/
17+
.idea/**/dataSources.ids
18+
.idea/**/dataSources.local.xml
19+
.idea/**/sqlDataSources.xml
20+
.idea/**/dynamic.xml
21+
.idea/**/uiDesigner.xml
22+
.idea/**/dbnavigator.xml
23+
24+
# Gradle
25+
.idea/**/gradle.xml
26+
.idea/**/libraries
27+
28+
# Gradle and Maven with auto-import
29+
# When using Gradle or Maven with auto-import, you should exclude module files,
30+
# since they will be recreated, and may cause churn. Uncomment if using
31+
# auto-import.
32+
# .idea/modules.xml
33+
# .idea/*.iml
34+
# .idea/modules
35+
36+
# CMake
37+
cmake-build-*/
38+
39+
# Mongo Explorer plugin
40+
.idea/**/mongoSettings.xml
41+
42+
# File-based project format
43+
*.iws
44+
45+
# IntelliJ
46+
out/
47+
48+
# mpeltonen/sbt-idea plugin
49+
.idea_modules/
50+
51+
# JIRA plugin
52+
atlassian-ide-plugin.xml
53+
54+
# Cursive Clojure plugin
55+
.idea/replstate.xml
56+
57+
# Crashlytics plugin (for Android Studio and IntelliJ)
58+
com_crashlytics_export_strings.xml
59+
crashlytics.properties
60+
crashlytics-build.properties
61+
fabric.properties
62+
63+
# Editor-based Rest Client
64+
.idea/httpRequests
65+

.goreleaser.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
builds:
2+
- binary: greeter
3+
env:
4+
- CGO_ENABLED=0
5+
goos:
6+
- linux
7+
goarch:
8+
- amd64
9+
archive:
10+
format: tar.gz
11+
files:
12+
- LICENSE
13+
- README.md

.idea/greeter.iml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 75 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/watcherTasks.xml

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
.PHONY: build install snapshot dist test vet lint fmt run clean docker
2+
OUT := greeter
3+
PKG := github.com/emgag/greeter
4+
VERSION := $(shell git describe --always --dirty --tags)
5+
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
6+
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/)
7+
8+
all: build
9+
10+
build:
11+
CGO_ENABLED=0 GOOS=linux go build -a -v -o ${OUT} ${PKG}
12+
13+
install:
14+
CGO_ENABLED=0 GOOS=linux go install -a -v -o ${OUT} ${PKG}
15+
16+
snapshot:
17+
goreleaser --snapshot --rm-dist
18+
19+
dist:
20+
goreleaser --rm-dist
21+
22+
test:
23+
@go test -v ${PKG_LIST}
24+
25+
vet:
26+
@go vet ${PKG_LIST}
27+
28+
lint:
29+
@for file in ${GO_FILES} ; do \
30+
golint $$file ; \
31+
done
32+
33+
fmt:
34+
@gofmt -l -w -s ${GO_FILES}
35+
36+
run: build
37+
./${OUT} listen
38+
39+
clean:
40+
-@rm ${OUT}
41+

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# greeter
2-
Simple console greeter displaying some basic stuff about the server
2+
3+
Simple console greeter displaying some basic stuff about the system for a quick overview.
4+
5+

go.mod

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module github.com/emgag/greeter
2+
3+
require (
4+
github.com/dustin/go-humanize v1.0.0
5+
github.com/hako/durafmt v0.0.0-20180520121703-7b7ae1e72ead
6+
github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e
7+
github.com/sanity-io/litter v1.1.0
8+
github.com/shirou/gopsutil v2.18.10+incompatible
9+
golang.org/x/sys v0.0.0-20181119195503-ec83556a53fe // indirect
10+
)

0 commit comments

Comments
 (0)