Skip to content

Latest commit

 

History

History
26 lines (15 loc) · 379 Bytes

New.md

File metadata and controls

26 lines (15 loc) · 379 Bytes

func New(text string) error

参数列表

  • text 错误字符串

返回值:

  • 返回error

功能说明:

New returns an error that formats as the given text. 按给定的文本返回一个新的 error.

代码实例:

    package main

    import  "fmt"
    import  "errors"

    func main(){
            fmt.Println(errors.New("Err"))
    }