We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
GetDefault
getDefault
1 parent 8b6927a commit bf5db75Copy full SHA for bf5db75
default.go
@@ -44,9 +44,9 @@ func SetDefault(d Default) {
44
}
45
46
47
-// GetDefault gets default.
+// getDefault gets default.
48
// 获取全局默认值
49
-func GetDefault() Default {
+func getDefault() Default {
50
return Default{
51
Layout: defaultLayout,
52
Timezone: defaultTimezone,
default_unit_test.go
@@ -7,9 +7,7 @@ import (
7
)
8
9
func TestCarbon_SetDefault(t *testing.T) {
10
- original := GetDefault()
11
-
12
- defer SetDefault(original)
+ defer SetDefault(getDefault())
13
14
SetDefault(Default{
15
Layout: DateTimeLayout,
0 commit comments