Last active
April 30, 2024 08:12
-
-
Save dexterp/392c02c09684b0aeb0828a655e02be7c to your computer and use it in GitHub Desktop.
GO Injector
This file contains hidden or 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 inject | |
type Config struct { | |
} | |
type Inject struct { | |
cfg Config | |
} | |
func New(c Config) *Inject { | |
return &Inject{ | |
cfg: c, | |
} | |
} | |
var _string *String | |
func (i *Inject) String() *String { | |
if _string != nil { | |
return _string | |
} | |
str := "Hello World" | |
_string = &str | |
return _string | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment