From 3a6070dc9882d43b00bd66b23492daa422435c7c Mon Sep 17 00:00:00 2001 From: Ian Gudger Date: Tue, 22 May 2018 11:53:42 -0700 Subject: [PATCH] Clarify that syserr.New must only be called during init PiperOrigin-RevId: 197599402 Change-Id: I23eb0336195ab0d3e5fb49c0c57fc9e0715a9b75 --- pkg/syserr/syserr.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/syserr/syserr.go b/pkg/syserr/syserr.go index eaa0ec920..5d9fa24de 100644 --- a/pkg/syserr/syserr.go +++ b/pkg/syserr/syserr.go @@ -31,6 +31,8 @@ type Error struct { } // New creates a new Error and adds a translation for it. +// +// New must only be called at init. func New(message string, linuxTranslation *linux.Errno) *Error { err := &Error{message} linuxABITranslations[err] = linuxTranslation