開発環境を構築する
This commit is contained in:
parent
0f346a62f1
commit
afe4113c2a
20
Makefile
Normal file
20
Makefile
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
App=skacksend
|
||||||
|
|
||||||
|
.PHONY: fmt vet test build run check
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
go fmt ./...
|
||||||
|
|
||||||
|
vet:
|
||||||
|
go vet ./...
|
||||||
|
|
||||||
|
test:
|
||||||
|
go test -v ./...
|
||||||
|
|
||||||
|
build:
|
||||||
|
go build -o bin/$(App) ./cmd/$(App)
|
||||||
|
|
||||||
|
run:
|
||||||
|
go run ./cmd/$(App)
|
||||||
|
|
||||||
|
check: fmt vet test
|
||||||
22
README.md
22
README.md
@ -1,3 +1,23 @@
|
|||||||
# slacksend
|
# slacksend
|
||||||
|
|
||||||
Slackにメッセージを送信する
|
Slackにメッセージを送信する
|
||||||
|
|
||||||
|
## Dev
|
||||||
|
|
||||||
|
実行
|
||||||
|
|
||||||
|
```sh
|
||||||
|
go run ./cmd/slacksend
|
||||||
|
```
|
||||||
|
|
||||||
|
ビルド
|
||||||
|
|
||||||
|
```sh
|
||||||
|
go build -o slacksend ./cmd/slacksend
|
||||||
|
```
|
||||||
|
|
||||||
|
## init
|
||||||
|
|
||||||
|
```sh
|
||||||
|
go mod init gitea.pglikers.com/tools/slacksen
|
||||||
|
```
|
||||||
11
cmd/slacksend/main.go
Normal file
11
cmd/slacksend/main.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func hello() string {
|
||||||
|
return "hello"
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fmt.Println(hello())
|
||||||
|
}
|
||||||
12
cmd/slacksend/main_test.go
Normal file
12
cmd/slacksend/main_test.go
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import "testing"
|
||||||
|
|
||||||
|
func TestHello(t *testing.T) {
|
||||||
|
got := hello()
|
||||||
|
want := "hello"
|
||||||
|
|
||||||
|
if got != want {
|
||||||
|
t.Errorf("hello() = %q, want %q", got, want)
|
||||||
|
}
|
||||||
|
}
|
||||||
7
readme/dev.md
Normal file
7
readme/dev.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Go Dev
|
||||||
|
|
||||||
|
## Formatter
|
||||||
|
|
||||||
|
```sh
|
||||||
|
gofmt -w .
|
||||||
|
```
|
||||||
Loading…
x
Reference in New Issue
Block a user