AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
.Go로 HTML 사용자 인터페이스를 작성하기 위한 언어
A language for writing HTML user interfaces in Go.
개발 도구Go · templGitHub @a-h직접 설치운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
설치형 프로젝트는 배포 도메인 없이도 확인할 수 있습니다. 개인 저장소는 GitHub 로그인으로, 조직 저장소는 위의 저장소 확인 파일로 직접 확인해 주세요.
메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗See user documentation at https://templ.guide
Set the version of templ to the current version.
version set
Build a local version.
version set
cd cmd/templ
go build
Build and install current version.
# Remove templ from the non-standard ~/bin/templ path
# that this command previously used.
rm -f ~/bin/templ
# Clear LSP logs.
rm -f cmd/templ/lspcmd/*.txt
# Update version.
version set
# Install to $GOPATH/bin or $HOME/go/bin
cd cmd/templ && go install
Use goreleaser to build the command line binary using goreleaser.
goreleaser build --snapshot --clean
Run templ generate using local version.
go run ./cmd/templ generate -include-version=false
Run Go tests.
version set
go run ./cmd/templ generate -include-version=false
go test ./...
Run Go tests.
version set
go run ./cmd/templ generate -include-version=false
go test ./... -short
Run Go tests.
# Create test profile directories.
mkdir -p coverage/fmt
mkdir -p coverage/generate
mkdir -p coverage/version
mkdir -p coverage/unit
# Build the test binary.
go build -cover -o ./coverage/templ-cover ./cmd/templ
# Run the covered generate command.
GOCOVERDIR=coverage/fmt ./coverage/templ-cover fmt .
GOCOVERDIR=coverage/generate ./coverage/templ-cover generate -include-version=false
GOCOVERDIR=coverage/version ./coverage/templ-cover version
# Run the unit tests.
go test -cover ./... -coverpkg ./... -args -test.gocoverdir="$PWD/coverage/unit"
# Display the combined percentage.
go tool covdata percent -i=./coverage/fmt,./coverage/generate,./coverage/version,./coverage/unit
# Generate a text coverage profile for tooling to use.
go tool covdata textfmt -i=./coverage/fmt,./coverage/generate,./coverage/version,./coverage/unit -o coverage.out
# Print total
go tool cover -func coverage.out | grep total
gotestsum --watch -- -coverprofile=coverage.out
Run each fuzz test for FUZZTIME (default 120s).
./parser/v2/fuzz.sh
./parser/v2/goexpression/fuzz.sh
./runtime/fuzzing/fuzz.sh
./internal/jstokenizer/fuzzing/fuzz.sh
Run the runtime and JavaScript tokenizer fuzz tests against their seed and committed corpora, without fuzzing. These fuzz tests are in separate modules, so that their JavaScript engine and parser dependencies are not dependencies of templ, and go test ./... in the root module doesn't run them. The parser fuzz tests are in the root module, so test and test-cover run their corpora.
(cd runtime/fuzzing && go test ./...) &&
(cd internal/jstokenizer/fuzzing && go test ./...)
Run benchmarks.
go run ./cmd/templ generate -include-version=false && go test ./... -bench=. -benchmem
Run the templ fmt benchmarks, which include the time taken by prettier.
go test ./internal/format -run '^$' -bench BenchmarkTempl -benchtime 3x
Format all Go and templ code.
gofmt -s -w .
go run ./cmd/templ fmt .
Run the lint operations that are run as part of the CI.
golangci-lint run --verbose
Check for known vulnerabilities in dependencies that templ calls.
govulncheck ./...
Ensure that templ files have been generated with the local version of templ, and that those files have been added to git.
Requires: generate
git diff --exit-code
Push a semantic version number to GitHub to trigger the release process.
version push --prefix="v"
Run the development server.
Directory: docs
npm run start
Build production docs site.
Directory: docs
npm run build