Go module setup.

master
Zed A. Shaw 3 weeks ago
parent 0e547812eb
commit 9d1b046d30
  1. 2
      .gitignore
  2. 29
      Makefile
  3. 3
      go.mod
  4. 9
      main.go

2
.gitignore vendored

@ -31,4 +31,4 @@ config.toml
public
*.idx
*.sqlite3
webapp
ttarpit

@ -0,0 +1,29 @@
build:
go build .
compare:
./ttarpit -input ./tests/images/bash_test.png -output none.png -pixel-width 4 -color-depth 16 -dither 0
./ttarpit -input ./tests/images/bash_test.png -output floyd.png -pixel-width 4 -color-depth 16 -dither 1
./ttarpit -input ./tests/images/bash_test.png -output atkinson.png -pixel-width 4 -color-depth 16 -dither 2
test:
go test MY/webapp/tests -c
./tests.test
test_only:
go test . -c -o
./tests.test -test.run TestSomePage
docs:
pkgsite --open
coverage:
go build -cover -o webapp
mkdir -p .coverage
echo "GOCOVERDIR=.coverage ./webapp"
cover_report:
go tool covdata textfmt -i=.coverage -o coverage.txt
go tool cover -func=coverage.txt
go tool cover -html=coverage.txt -o coverage.html
open coverage.html

@ -0,0 +1,3 @@
module lcthw.dev/go/ttarpit
go 1.25.3

@ -0,0 +1,9 @@
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello!")
}
Loading…
Cancel
Save