From 5bb4bf768d7d830a98240b29f384ba2986f60b4e Mon Sep 17 00:00:00 2001 From: HAHWUL Date: Fri, 29 Jan 2021 10:24:46 +0900 Subject: [PATCH] Initial commit --- .github/FUNDING.yml | 3 ++ .gitignore | 15 ++++++++ .goreleaser.yml | 82 +++++++++++++++++++++++++++++++++++++++++ Dockerfile | 13 +++++++ LICENSE | 21 +++++++++++ README.md | 10 +++++ init.sh | 22 +++++++++++ pkg/printing/banner.go | 6 +++ pkg/printing/version.go | 4 ++ 9 files changed, 176 insertions(+) create mode 100644 .github/FUNDING.yml create mode 100644 .gitignore create mode 100644 .goreleaser.yml create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md create mode 100644 init.sh create mode 100644 pkg/printing/banner.go create mode 100644 pkg/printing/version.go diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..f295e8b --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +custom: ['https://paypal.me/hahwul', 'https://www.buymeacoffee.com/hahwul'] diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..66fd13c --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..1ff8597 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,82 @@ +project_name: TEMPALTE-HAHWUL + +before: + hooks: + - go mod download + +builds: + - + main: . + binary: TEMPALTE-HAHWUL + goos: + - windows + - linux + - darwin + - freebsd + goarch: + - amd64 + - 386 + - arm + - arm64 + goarm: + - 6 + ignore: + - goos: darwin + goarch: 386 + - goos: darwin + goarch: arm + - goos: darwin + goarch: arm64 + - goos: windows + goarch: 386 + - goos: windows + goarch: arm + - goos: windows + goarch: arm64 + +checksum: + name_template: "{{ .ProjectName }}_checksums.txt" + +changelog: + sort: desc + filters: + exclude: + - '^MERGE' + - "{{ .Tag }}" + +release: + github: + owner: hahwul + name: TEMPALTE-HAHWUL + +brews: + - + name: TEMPALTE-HAHWUL + tap: + owner: hahwul + name: homebrew-TEMPALTE-HAHWUL + url_template: "https://github.com/hahwul/TEMPALTE-HAHWUL/releases/download/{{ .Tag }}/{{ .ArtifactName }}" + commit_author: + name: hahwul + email: hahwul@gmail.com + folder: Formula + homepage: "https://www.hahwul.com" + description: "" + test: | + system "#{bin}/TEMPALTE-HAHWUL version" + install: | + bin.install "TEMPALTE-HAHWUL" +snapcrafts: + - + name: TEMPALTE-HAHWUL + # Remember you need to `snapcraft login` first. + publish: true + summary: abcd + description: abcd + grade: stable + confinement: strict + license: MIT + + apps: + TEMPALTE-HAHWUL: + plugs: ["home","network","network-bind"] diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..97f72f4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +# BUILDER +FROM golang:latest AS builder +WORKDIR /go/src/app +COPY . . + +RUN go get -d -v ./... +RUN go build -o abcd + +# RUNNING +FROM debian:buster +RUN mkdir /app +WORKDIR /app/ +CMD ["/app/abcd"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0931104 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 HAHWUL + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..62390b9 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +

+
+ +
+ + + +

+ +> Oneline Description! diff --git a/init.sh b/init.sh new file mode 100644 index 0000000..6c92317 --- /dev/null +++ b/init.sh @@ -0,0 +1,22 @@ +echo "[+] Start init" +echo "[+] Prject name?" +read templatehahwul +echo "[+] Your project name is $templatehahwul" + +# 1 +echo "[+] Change .goreleaer.yml" +sed "s/TEMPLATE-HAHWUL/\$templatehahwul/" .goreleaser.yml | tee .goreleaser.yml + +#2 +echo "[+] Make 'go.mod'" +go mod init github.com/hahwul/$templatehahwul + +#3 +echo "[+] Cobra init" +cobra init --pkg-name github.com/hahwul/$templatehahwul +cobra add version + +#final +echo "[+] Delete init.sh" +git rm init.sh +echo "[+] Please check '.goreleaser.yml' for descriptions" diff --git a/pkg/printing/banner.go b/pkg/printing/banner.go new file mode 100644 index 0000000..8831210 --- /dev/null +++ b/pkg/printing/banner.go @@ -0,0 +1,6 @@ +package printing + +// Banner is banner func +func Banner() { + +} diff --git a/pkg/printing/version.go b/pkg/printing/version.go new file mode 100644 index 0000000..c2bfa20 --- /dev/null +++ b/pkg/printing/version.go @@ -0,0 +1,4 @@ +package printing + +// VERSION is version +const VERSION = "v0.0.1"