mirror of
https://github.com/kairos-io/kcrypt-challenger.git
synced 2025-08-13 12:15:57 +00:00
🐛 Fixup unmarshal to anonymous struct
This commit is contained in:
parent
d9da1b4090
commit
06b8dc9c58
@ -52,14 +52,14 @@ func getPass(server, label string) (string, error) {
|
|||||||
func start() error {
|
func start() error {
|
||||||
factory := pluggable.NewPluginFactory()
|
factory := pluggable.NewPluginFactory()
|
||||||
|
|
||||||
connectionDetails := &struct {
|
connectionDetails := struct {
|
||||||
Server string `yaml:"challenger_server"`
|
Server string `yaml:"challenger_server"`
|
||||||
}{}
|
}{}
|
||||||
|
|
||||||
var server string
|
var server string
|
||||||
d, err := machine.DotToYAML("/proc/cmdline")
|
d, err := machine.DotToYAML("/proc/cmdline")
|
||||||
if err == nil { // best-effort
|
if err == nil { // best-effort
|
||||||
yaml.Unmarshal(d, connectionDetails) //nolint:errcheck
|
yaml.Unmarshal(d, &connectionDetails) //nolint:errcheck
|
||||||
}
|
}
|
||||||
server = connectionDetails.Server
|
server = connectionDetails.Server
|
||||||
if os.Getenv("WSS_SERVER") != "" {
|
if os.Getenv("WSS_SERVER") != "" {
|
||||||
|
Loading…
Reference in New Issue
Block a user