mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
![Percy Wegmann](/assets/img/avatar_default.png)
Uses https://go-review.googlesource.com/c/crypto/+/613856 DO NOT MERGE Change-Id: I0083fe34015e2ba39374ee58deae68c112b24750 Signed-off-by: Percy Wegmann <percy@tailscale.com>
26 lines
468 B
Go
26 lines
468 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package tailscaleroot
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"golang.org/x/mod/modfile"
|
|
)
|
|
|
|
func testGoMod(t *testing.T) {
|
|
goMod, err := os.ReadFile("go.mod")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
f, err := modfile.Parse("go.mod", goMod, nil)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if len(f.Replace) > 0 {
|
|
t.Errorf("go.mod has %d replace directives; expect zero in this repo", len(f.Replace))
|
|
}
|
|
}
|