Posts Tagged conf

Config library for golang

Publishing config library to be used with go, it stores/loads structure as JSON file, so you can use it to keep options of your app: github.com/bykovme/goconfig

Example of using: github.com/bykovme/goconfig/blob/master/example/load_config.go

There are only 5 functions:

  • SaveConfig – saving configuration from structure into the file
  • LoadConfig – loading configuration from file into the structure
  • SearchForConfigFile – search for config file in different locations
  • GetLocalPath – get current path where executable app is running
  • GetUserPath – get user home folder

, , ,

Leave a comment