mirror of
https://gitee.com/johng/gf.git
synced 2024-12-05 05:37:55 +08:00
27 lines
465 B
Go
27 lines
465 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() {
|
|
//err := ReadConfig()
|
|
//glog.Printf("%s\n%+s", err, err)
|
|
//glog.Printf("%+v", err)
|
|
fmt.Printf("%+v", ReadConfig())
|
|
}
|