2019-06-29 23:35:32 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2019-07-13 14:24:44 +08:00
|
|
|
"fmt"
|
2019-06-29 23:35:32 +08:00
|
|
|
|
2019-07-29 21:01:19 +08:00
|
|
|
"github.com/gogf/gf/errors/gerror"
|
2019-06-29 23:35:32 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
func OpenFile() error {
|
|
|
|
return gerror.New("permission denied")
|
|
|
|
}
|
|
|
|
|
|
|
|
func OpenConfig() error {
|
|
|
|
return gerror.Wrap(OpenFile(), "configuration file opening failed")
|
|
|
|
}
|
|
|
|
|
2019-06-30 12:54:06 +08:00
|
|
|
func ReadConfig() error {
|
|
|
|
return gerror.Wrap(OpenConfig(), "reading configuration failed")
|
|
|
|
}
|
|
|
|
|
2019-06-29 23:35:32 +08:00
|
|
|
func main() {
|
2019-07-13 14:24:44 +08:00
|
|
|
//err := ReadConfig()
|
|
|
|
//glog.Printf("%s\n%+s", err, err)
|
|
|
|
//glog.Printf("%+v", err)
|
|
|
|
fmt.Printf("%+v", ReadConfig())
|
2019-06-29 23:35:32 +08:00
|
|
|
}
|