add resource feature for gcfg

This commit is contained in:
John
2019-08-19 21:02:44 +08:00
parent e151055521
commit 10e03eef3b
28 changed files with 156 additions and 73 deletions

View File

@ -10,7 +10,7 @@ import "github.com/gogf/gf/container/gmap"
const (
// Default group name for instance usage.
DEFAULT_INSTANCE_NAME = "default"
DEFAULT_NAME = "default"
)
var (
@ -21,7 +21,7 @@ var (
// Instance returns an instance of Resource.
// The parameter <name> is the name for the instance.
func Instance(name ...string) *Resource {
key := DEFAULT_INSTANCE_NAME
key := DEFAULT_NAME
if len(name) > 0 && name[0] != "" {
key = name[0]
}