Closed l50 closed 4 months ago
Added:
.hooks/run-go-tests.sh
go-unit-tests
.pre-commit-config.yaml
logMutex
cmd/run_test.go
initOnce
InitLog
pkg/logging/logger.go
Changed:
pkg/logging/logger_test.go
sync.Once
@l50 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@l50 merged this pull request in facebookincubator/TTPForge@0d980eaa76861f9c9b3213cece9f0151969125ff.
Added:
.hooks/run-go-tests.sh
to run Go tests with options for coverage, all tests, short tests, and tests for modified files.go-unit-tests
pre-commit hook to.pre-commit-config.yaml
to run unit tests on modified Go files.logMutex
to sync logging incmd/run_test.go
.initOnce
to ensureInitLog
runs only once inpkg/logging/logger.go
Changed:
pkg/logging/logger.go
andpkg/logging/logger_test.go
to © 2024-present.pkg/logging/logger.go
to usesync.Once
for logger initialization.