1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-06 15:50:18 +00:00

add vendor

This commit is contained in:
astaxie
2018-07-30 12:05:51 +08:00
parent d55f54a8ab
commit 48acfa08be
496 changed files with 327583 additions and 0 deletions

31
vendor/github.com/wendal/errors/README.md generated vendored Normal file
View File

@ -0,0 +1,31 @@
errors
======
增强型errors包(for golang)
--------------------------
完全兼容官方的errors包,且附带堆栈信息,方便debug
----------------------------------------------
API完全兼容
安装
----
```
go get github.com/wendal/errors
```
使用
----
仅需将
```
import errors
```
改为
```
import github.com/wendal/errors
```

30
vendor/github.com/wendal/errors/errors.go generated vendored Normal file
View File

@ -0,0 +1,30 @@
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// And Modify By Wendal (wendal1985@gmail.com)
// Package errors implements functions to manipulate errors.
package errors
import (
"runtime/debug"
)
var AddStack = true
// New returns an error that formats as the given text.
func New(text string) error {
if AddStack {
text += "\n" + string(debug.Stack())
}
return &errorString{text}
}
// errorString is a trivial implementation of error.
type errorString struct {
s string
}
func (e *errorString) Error() string {
return e.s
}