···88 @echo
99 @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[01;32m%-20s\033[0m %s\n", $$1, $$2}'
10101111-.PHONY: build
1212-build: ## Build all executables
1313- go build ./cmd/webplc
1111+#.PHONY: build
1212+#build: ## Build all executables
1313+# go build ./...
14141515.PHONY: test
1616test: ## Run all tests
···3333.PHONY: check
3434check: ## Compile everything, checking syntax (does not output binaries)
3535 go build ./...
3636-3737-.env:
3838- if [ ! -f ".env" ]; then cp example.dev.env .env; fi
3939-4040-.PHONY: run-dev-webplc
4141-run-dev-webplc: .env ## Runs 'bskyweb' for local dev
4242- GOLOG_LOG_LEVEL=info go run ./cmd/webplc serve --debug
+2-14
go-didplc/README.md
···4455This golang package will eventually be an implementation of the did:plc specification in golang, including at a minimum verification of DID documents from a PLC operation log.
6677-For now it primarily contains a basic website for the PLC directory, allowing lookup of individual DID documents.
88-99-107## Developer Quickstart
1181212-Install golang. We are generally using v1.20+.
1313-1414-In this directory (`go-didplc/`):
1515-1616- # re-build and run daemon
1717- go run ./cmd/webplc serve
1818-1919- # build and output a binary
2020- go build -o webplc ./cmd/webplc/
99+Install golang. We are generally using v1.22+.
21102222-The easiest way to configure the daemon is to copy `example.env` to `.env` and
2323-fill in auth values there.
1111+In this directory (`go-didplc/`) there is a Makefile with helpers for running tests, etc. Run `make help` to list available commands.
···11+22+SHELL = /bin/bash
33+.SHELLFLAGS = -o pipefail -c
44+55+.PHONY: help
66+help: ## Print info about all commands
77+ @echo "Commands:"
88+ @echo
99+ @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[01;32m%-20s\033[0m %s\n", $$1, $$2}'
1010+1111+.PHONY: build
1212+build: ## Build all executables
1313+ go build . -o webplc
1414+1515+.PHONY: test
1616+test: ## Run all tests
1717+ go test ./...
1818+1919+.PHONY: coverage-html
2020+coverage-html: ## Generate test coverage report and open in browser
2121+ go test ./... -coverpkg=./... -coverprofile=test-coverage.out
2222+ go tool cover -html=test-coverage.out
2323+2424+.PHONY: lint
2525+lint: ## Verify code style and run static checks
2626+ go vet ./...
2727+ test -z $(gofmt -l ./...)
2828+2929+.PHONY: fmt
3030+fmt: ## Run syntax re-formatting (modify in place)
3131+ go fmt ./...
3232+3333+.PHONY: check
3434+check: ## Compile everything, checking syntax (does not output binaries)
3535+ go build ./...
3636+3737+.env:
3838+ if [ ! -f ".env" ]; then cp example.dev.env .env; fi
3939+4040+.PHONY: run-dev-webplc
4141+run-dev-webplc: .env ## Runs 'webplc' for local dev
4242+ GOLOG_LOG_LEVEL=info go run . serve --debug
+20
website/README.md
···11+22+`web.plc.directory`
33+===================
44+55+This is a basic website for the PLC directory, allowing lookup of individual DID documents. It also hosts a copy of the PLC specs.
66+77+88+## Developer Quickstart
99+1010+Install golang. We are generally using v1.22+.
1111+1212+In this directory (`website/`):
1313+1414+ # re-build and run daemon
1515+ go run . serve
1616+1717+ # build and output a binary
1818+ go build -o webplc .
1919+2020+The easiest way to configure the daemon is to copy `example.env` to `.env` and fill in auth values there.