Errutil: Update documentation for Go 1.19 (#55807)
This commit is contained in:
@@ -15,8 +15,8 @@ var (
|
||||
// same error message for the frontend statically within the
|
||||
// package.
|
||||
|
||||
errAbsPath = errutil.NewBase(errutil.StatusBadRequest, "shorturl.absolute-path")
|
||||
errInvalidPath = errutil.NewBase(errutil.StatusBadRequest, "shorturl.invalid-path")
|
||||
errAbsPath = errutil.NewBase(errutil.StatusBadRequest, "shorturl.absolutePath")
|
||||
errInvalidPath = errutil.NewBase(errutil.StatusBadRequest, "shorturl.invalidPath")
|
||||
errUnexpected = errutil.NewBase(errutil.StatusInternal, "shorturl.unexpected")
|
||||
)
|
||||
|
||||
@@ -29,8 +29,8 @@ func Example() {
|
||||
fmt.Println(e.Error())
|
||||
|
||||
// Output:
|
||||
// 400 shorturl.invalid-path
|
||||
// [shorturl.invalid-path] path mustn't contain '..': 'abc/../def'
|
||||
// 400 shorturl.invalidPath
|
||||
// [shorturl.invalidPath] path mustn't contain '..': 'abc/../def'
|
||||
}
|
||||
|
||||
// CreateShortURL runs a few validations and returns
|
||||
|
||||
Reference in New Issue
Block a user