Created
January 26, 2019 17:08
-
-
Save MalloZup/92e55e15cda9fbe06ad752d75b6bebcb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type joinData struct { | |
Cfg string | |
} | |
func (j joinData) TLSBootstrapCfg() string { | |
if j.Cfg != "" { | |
fmt.Printf("BATMAN IS ALONE? \n") | |
fmt.Printf("%s \n", j.Cfg) | |
return j.Cfg | |
} | |
// do stuff | |
Cfg := "He SHOULD BE with ROBIN" | |
// assign | |
j.Cfg = Cfg | |
fmt.Printf("%s", j.Cfg) | |
return Cfg | |
} | |
func main() { | |
emp1 := joinData{ | |
Cfg: "Dunno", | |
} | |
emp1.TLSBootstrapCfg() | |
emp1.TLSBootstrapCfg() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment