-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
init KV from .json file #1
base: master
Are you sure you want to change the base?
Conversation
Add README |
|
||
func main() { | ||
fmt.Println("Hello World!") | ||
x := gonsul.Gonsul{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x => consul
any other variable name also works
Path: "gonsul", | ||
File: "./example.json", | ||
HttpClient: http.Client{ | ||
Timeout: time.Second * 30, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or as param?
}, | ||
} | ||
err := x.InitFromFile() | ||
fmt.Println(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
err check
Considering we use this package in another project, how would be initialise consul, can you make a Initfunction thats public |
ignore above |
No description provided.