Skip to content

Latest commit

 

History

History
70 lines (45 loc) · 1.74 KB

README.md

File metadata and controls

70 lines (45 loc) · 1.74 KB

Go Properties

Summary


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.

Set Up

Download the project

go get https://github.com/svenschaper/goproperties

Import the package into your go File

import "github.com/svenschaper/goproperties"

How to use?

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")
}


Need custom development?

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

License

MIT licensed. In short -> Have fun with it!