summaryrefslogtreecommitdiffhomepage
path: root/runsc/specutils
diff options
context:
space:
mode:
authorIan Lewis <ianlewis@google.com>2020-04-07 18:49:52 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-07 18:51:01 -0700
commit56054fc1fb0b92cb985f96467f9059e202d8095c (patch)
treea215d76616aebbdbfa4c748de82e9f1283523e87 /runsc/specutils
parent5802051b3d60a802713fabbd805614f22c9291ea (diff)
Add friendlier messages for frequently encountered errors.
Issue #2270 Issue #1765 PiperOrigin-RevId: 305385436
Diffstat (limited to 'runsc/specutils')
-rw-r--r--runsc/specutils/specutils.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/runsc/specutils/specutils.go b/runsc/specutils/specutils.go
index d3c2e4e78..0f4a9cf6d 100644
--- a/runsc/specutils/specutils.go
+++ b/runsc/specutils/specutils.go
@@ -528,3 +528,8 @@ func EnvVar(env []string, name string) (string, bool) {
}
return "", false
}
+
+// FaqErrorMsg returns an error message pointing to the FAQ.
+func FaqErrorMsg(anchor, msg string) string {
+ return fmt.Sprintf("%s; see https://gvisor.dev/faq#%s for more details", msg, anchor)
+}