mirror of
https://gitee.com/johng/gf.git
synced 2024-12-01 11:48:09 +08:00
24 lines
387 B
Go
24 lines
387 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/gogf/gf/errors/gerror"
|
|
)
|
|
|
|
func OpenFile() error {
|
|
return gerror.New("permission denied")
|
|
}
|
|
|
|
func OpenConfig() error {
|
|
return gerror.Wrap(OpenFile(), "configuration file opening failed")
|
|
}
|
|
|
|
func ReadConfig() error {
|
|
return gerror.Wrap(OpenConfig(), "reading configuration failed")
|
|
}
|
|
|
|
func main() {
|
|
fmt.Println(gerror.Cause(ReadConfig()))
|
|
}
|