github.com/zhongdalu/gf@v1.0.0/g/os/gview/gview_error.go (about) 1 // Copyright 2019 gf Author(https://github.com/zhongdalu/gf). All Rights Reserved. 2 // 3 // This Source Code Form is subject to the terms of the MIT License. 4 // If a copy of the MIT was not distributed with this file, 5 // You can obtain one at https://github.com/zhongdalu/gf. 6 7 package gview 8 9 import ( 10 "github.com/zhongdalu/gf/g/internal/cmdenv" 11 ) 12 13 const ( 14 // gERROR_PRINT_KEY is used to specify the key controlling error printing to stdout. 15 // This error is designed not to be returned by functions. 16 gERROR_PRINT_KEY = "gf.gview.errorprint" 17 ) 18 19 // errorPrint checks whether printing error to stdout. 20 func errorPrint() bool { 21 return cmdenv.Get(gERROR_PRINT_KEY, true).Bool() 22 }