2021-01-17 21:46:25 +08:00
|
|
|
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
2019-06-13 20:29:40 +08:00
|
|
|
//
|
|
|
|
// This Source Code Form is subject to the terms of the MIT License.
|
|
|
|
// If a copy of the MIT was not distributed with this file,
|
|
|
|
// You can obtain one at https://github.com/gogf/gf.
|
|
|
|
|
|
|
|
package gcfg
|
|
|
|
|
|
|
|
import (
|
2020-12-04 23:44:54 +08:00
|
|
|
"github.com/gogf/gf/os/gcmd"
|
2019-06-13 20:29:40 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
// gERROR_PRINT_KEY is used to specify the key controlling error printing to stdout.
|
|
|
|
// This error is designed not to be returned by functions.
|
|
|
|
gERROR_PRINT_KEY = "gf.gcfg.errorprint"
|
|
|
|
)
|
|
|
|
|
|
|
|
// errorPrint checks whether printing error to stdout.
|
|
|
|
func errorPrint() bool {
|
2020-12-04 23:44:54 +08:00
|
|
|
return gcmd.GetWithEnv(gERROR_PRINT_KEY, true).Bool()
|
2019-06-19 09:06:52 +08:00
|
|
|
}
|