Skip to content

Commit f0809e1

Browse files
no need to export internal variable
1 parent 8632ea4 commit f0809e1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tool.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/sertangulveren/sypher/internal/utils"
88
)
99

10-
var Cred *procs.Sypher
10+
var cred *procs.Sypher
1111

1212
var fs *embed.FS
1313

@@ -23,22 +23,22 @@ func RegisterFS(projectFs *embed.FS) {
2323
// Load to make ready to use sypher
2424
func Load(config ...Config) {
2525
if len(config) == 0 {
26-
Cred = procs.NewSypher()
26+
cred = procs.NewSypher()
2727
} else {
2828
cfg := config[0]
29-
Cred = &procs.Sypher{
29+
cred = &procs.Sypher{
3030
Name: cfg.Name,
3131
Key: cfg.Key,
3232
}
3333
}
3434

35-
Cred.Prepare()
35+
cred.Prepare()
3636
}
3737

3838
// Get provides the string value of key
3939
func Get(configKey string) string {
40-
if !Cred.Ready {
40+
if !cred.Ready {
4141
utils.PanicWithError(errors.New("sypher is not ready"))
4242
}
43-
return string(Cred.Data[configKey])
43+
return string(cred.Data[configKey])
4444
}

0 commit comments

Comments
 (0)