Go Properties is a property file loader for golang projects without any additional dependency except golang core components. At the moment the property loader is able to open configuration files and read key value pairs. More complex structures like arrays or nested objects are not supported yet but will be extended soon. The property loader provides a method to check a named property inside a file. The property file itlsef will be initialized as a singelton.
Download the project
go get https://github.com/svenschaper/goproperties
Import the package into your go File
import "github.com/svenschaper/goproperties"
Add the following to your go files
var prop *properties.Propertie
func init() {
properties.SetPropertiePath("path/to/your/config.yml")
p, err := properties.LoadProperty()
if err != nil {
fmt.Errorf(err.Error())
}
prop = p
}
func yourFunction(){
value := prop.GetProperty("yourkey")
}
Cloud Computing
- Infrastructure automation based on ansible
- Custom solutions based on AWS
- Custom solutions based on Google Cloud
- Custom solutions based on Azure Cloud
Integration
- API Management and Design
- Lightning fast Microservices based on Golang
MIT licensed. In short -> Have fun with it!