...

Text file src/nhooyr.io/websocket/ci/fmt.sh

Documentation: nhooyr.io/websocket/ci

     1#!/bin/sh
     2set -eu
     3cd -- "$(dirname "$0")/.."
     4
     5go mod tidy
     6(cd ./internal/thirdparty && go mod tidy)
     7(cd ./internal/examples && go mod tidy)
     8gofmt -w -s .
     9go run golang.org/x/tools/cmd/goimports@latest -w "-local=$(go list -m)" .
    10
    11npx prettier@3.0.3 \
    12  --write \
    13  --log-level=warn \
    14  --print-width=90 \
    15  --no-semi \
    16  --single-quote \
    17  --arrow-parens=avoid \
    18  $(git ls-files "*.yml" "*.md" "*.js" "*.css" "*.html")
    19
    20go run golang.org/x/tools/cmd/stringer@latest -type=opcode,MessageType,StatusCode -output=stringer.go

View as plain text