Skip to content

Instantly share code, notes, and snippets.

@MalloZup
Created January 26, 2019 17:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MalloZup/92e55e15cda9fbe06ad752d75b6bebcb to your computer and use it in GitHub Desktop.
Save MalloZup/92e55e15cda9fbe06ad752d75b6bebcb to your computer and use it in GitHub Desktop.
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