From b5660e8c0aa921525e805d8b3dbc58a54568337a Mon Sep 17 00:00:00 2001 From: liangzy Date: Mon, 31 Aug 2020 10:58:26 +0800 Subject: [PATCH] project init --- .gitignore | 9 +++++++++ Makefile | 29 +++++++++++++++++++++++++++++ main.go | 21 +++++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 main.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..173454b --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# Created by .ignore support plugin (hsz.mobi) +### Example user template template +### Example user template + +# IntelliJ project files +.idea +*.iml +out +gen diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d626070 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +VERSION = $(shell grep 'const version' cmd/commands/version/version.go | sed -E 's/.*"(.+)"$$/v\1/') + +.PHONY: all test clean build install + +GOFLAGS ?= $(GOFLAGS:) + +all: install test + +build: + go build $(GOFLAGS) ./... + +install: + go get $(GOFLAGS) ./... + +test: install + go test $(GOFLAGS) ./... + +bench: install + go test -run=NONE -bench=. $(GOFLAGS) ./... + +clean: + go clean $(GOFLAGS) -i ./... + +publish: + mkdir -p bin/$(VERSION) + cd bin/$(VERSION) + xgo -v -x --targets="windows/*,darwin/*,linux/386,linux/amd64,linux/arm-5,linux/arm64" -out bee_$(VERSION) github.com/beego/bee + cd .. + ghr -u beego -r bee $(VERSION) $(VERSION) \ No newline at end of file diff --git a/main.go b/main.go new file mode 100644 index 0000000..2ca5e96 --- /dev/null +++ b/main.go @@ -0,0 +1,21 @@ +package main + +import ( + "fmt" + "github.com/gookit/color" +) + +func main() { + logo := " _____ ____________ _ _ _ \n" + logo += "| __ \\| ___ \\ ___ \\ (_) (_) | \n" + logo += "| | \\/| |_/ / |_/ / ___ ___ __ _ ___ _ _ __ _| |_ \n" + logo += "| | __ | /| ___ \\/ _ \\/ _ \\/ _` |/ _ \\ | | '_ \\| | __|\n" + logo += "| |_\\ \\| |\\ \\| |_/ / __/ __/ (_| | (_) | | | | | | | |_ \n" + logo += " \\____/\\_| \\_\\____/ \\___|\\___|\\__, |\\___/ |_|_| |_|_|\\__|\n" + logo += " __/ | \n" + logo += " |___/ \n\n" + logo += " ------ by http://www.patorjk.com/software/taag/ -------\n" + red := color.Red.Render + fmt.Println("how o %s", red("fheosidfoaisufo")) + color.Yellow.Println(logo) +}