MCPcopy
hub / github.com/tailscale/tailscale / TestGoMod

Function TestGoMod

gomod_test.go:13–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func TestGoMod(t *testing.T) {
14 goMod, err := os.ReadFile("go.mod")
15 if err != nil {
16 t.Fatal(err)
17 }
18 f, err := modfile.Parse("go.mod", goMod, nil)
19 if err != nil {
20 t.Fatal(err)
21 }
22 if len(f.Replace) > 0 {
23 t.Errorf("go.mod has %d replace directives; expect zero in this repo", len(f.Replace))
24 }
25}

Callers

nothing calls this directly

Calls 4

ReadFileMethod · 0.65
FatalMethod · 0.65
ErrorfMethod · 0.65
ParseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…