mirror of
https://github.com/juanfont/headscale.git
synced 2026-05-25 19:48:42 +09:00
Every Go-identifier reference in // and /* */ comments now uses
godoc's [Name] linking syntax so pkg.go.dev and `go doc` render
them as clickable cross-references. No behaviour change.
Pattern applied across the tree:
In-package [Foo], [Foo.Bar]
Cross-package [pkg.Foo], [pkg.Foo.Bar]
Stdlib [netip.Prefix], [errors.Is], [context.Context]
Tailscale [tailcfg.MapResponse], [tailcfg.Node.CapMap],
[tailcfg.NodeAttrSuggestExitNode]
Skip rules:
- File:line refs left as plain text
- HuJSON wire keys inside backtick raw strings untouched
- ACL/policy syntax tokens (tag:foo, autogroup:self, ...) not Go
symbols, left as plain text
- JSON/OIDC wire keys, gorm tags, RFC IPv6 placeholders, markdown
link tags, decorative dividers — all left as-is
19 lines
752 B
Go
19 lines
752 B
Go
package zlog
|
|
|
|
import "github.com/rs/zerolog"
|
|
|
|
// init pins zerolog to [zerolog.TraceLevel] for the zlog test binary.
|
|
//
|
|
// zlog's tests use [zerolog.New] with a buffer and assert on Info-level output. zerolog's
|
|
// (*Logger).should() gates emission on the global level, so any global level
|
|
// above Info would silently break the assertions.
|
|
//
|
|
// Today zlog does not transitively import hscontrol/types, so the test
|
|
// silencing init() in hscontrol/types/testlog.go does not run in this binary.
|
|
// This init defends against that changing in the future: if a future import
|
|
// chain pulls in hscontrol/types, this file will still ensure trace-level
|
|
// output is available for zlog's assertions.
|
|
func init() {
|
|
zerolog.SetGlobalLevel(zerolog.TraceLevel)
|
|
}
|