aboutsummaryrefslogtreecommitdiff
path: root/internal/testing/sample/sample.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/testing/sample/sample.go')
-rw-r--r--internal/testing/sample/sample.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/testing/sample/sample.go b/internal/testing/sample/sample.go
index 6f6af2cc..13e17aeb 100644
--- a/internal/testing/sample/sample.go
+++ b/internal/testing/sample/sample.go
@@ -9,6 +9,7 @@ package sample
import (
"fmt"
"math"
+ "net/http"
"path"
"strings"
"time"
@@ -150,6 +151,17 @@ func DefaultModule() *internal.Module {
LegacyPackage(ModulePath, Suffix))
}
+func DefaultVersionMap() *internal.VersionMap {
+ return &internal.VersionMap{
+ ModulePath: ModulePath,
+ RequestedVersion: VersionString,
+ ResolvedVersion: VersionString,
+ Status: http.StatusOK,
+ GoModPath: "",
+ Error: "",
+ }
+}
+
// Module creates a Module with the given path and version.
// The list of suffixes is used to create LegacyPackages within the module.
func Module(modulePath, version string, suffixes ...string) *internal.Module {