File tree 4 files changed +19
-4
lines changed
4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ require (
42
42
github.com/cyphar/filepath-securejoin v0.4.0 // indirect
43
43
github.com/davidmz/go-pageant v1.0.2 // indirect
44
44
github.com/go-fed/httpsig v1.1.0 // indirect
45
- github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
46
45
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
47
46
github.com/google/go-github/v30 v30.1.0 // indirect
48
47
github.com/google/go-querystring v1.1.0 // indirect
@@ -99,7 +98,7 @@ require (
99
98
github.com/mattn/go-colorable v0.1.14 // indirect
100
99
github.com/mattn/go-isatty v0.0.20 // indirect
101
100
github.com/mattn/go-runewidth v0.0.15 // indirect
102
- github.com/mitchellh/mapstructure v1.5.0 // indirect
101
+ github.com/mitchellh/mapstructure v1.5.0
103
102
github.com/nats-io/nats.go v1.38.0
104
103
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
105
104
github.com/pterm/pterm v0.12.79
Original file line number Diff line number Diff line change @@ -95,8 +95,6 @@ github.com/go-git/go-git/v5 v5.13.2 h1:7O7xvsK7K+rZPKW6AQR1YyNhfywkv7B8/FsP3ki6Z
95
95
github.com/go-git/go-git/v5 v5.13.2 /go.mod h1:hWdW5P4YZRjmpGHwRH2v3zkWcNl6HeXaXQEMGb3NJ9A =
96
96
github.com/go-sourcemap/sourcemap v2.1.4+incompatible h1:a+iTbH5auLKxaNwQFg0B+TCYl6lbukKPc7b5x0n1s6Q =
97
97
github.com/go-sourcemap/sourcemap v2.1.4+incompatible /go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg =
98
- github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss =
99
- github.com/go-viper/mapstructure/v2 v2.2.1 /go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM =
100
98
github.com/gocarina/gocsv v0.0.0-20240520201108-78e41c74b4b1 h1:FWNFq4fM1wPfcK40yHE5UO3RUdSNPaBC+j3PokzA6OQ =
101
99
github.com/gocarina/gocsv v0.0.0-20240520201108-78e41c74b4b1 /go.mod h1:5YoVOkjYAQumqlV356Hj3xeYh4BdZuLE0/nRkf2NKkI =
102
100
github.com/godbus/dbus/v5 v5.0.4 /go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA =
Original file line number Diff line number Diff line change @@ -53,6 +53,15 @@ type NetworkManager struct {
53
53
nc * nats.Conn
54
54
}
55
55
56
+ var DefaultManager * NetworkManager
57
+
58
+ func GetManager () * NetworkManager {
59
+ if DefaultManager == nil {
60
+ DefaultManager = NewManager ()
61
+ }
62
+ return DefaultManager
63
+ }
64
+
56
65
func NewManager () * NetworkManager {
57
66
log .Debug ().Msg ("net.NewManager" )
58
67
return & NetworkManager {}
Original file line number Diff line number Diff line change @@ -12,6 +12,15 @@ import (
12
12
"github.com/rs/zerolog/log"
13
13
)
14
14
15
+ var DefaultManager * Manager
16
+
17
+ func GetManager () * Manager {
18
+ if DefaultManager == nil {
19
+ DefaultManager = NewManager ()
20
+ }
21
+ return DefaultManager
22
+ }
23
+
15
24
type ManagerOptions struct {
16
25
NatsUrl string
17
26
}
You can’t perform that action at this time.
0 commit comments