Skip to content

lonelymous/goco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goco

example


package main

import (
	"log"

	"github.com/lonelymous/goco"
)

type ServerConfig struct {
	Host string
	Port int
	CertFile string
	KeyFile string
}

func main() {
	serverConfig := &ServerConfig{}

	// Setup config
	err := goco.InitializeConfig(serverConfig)
	if err != nil {
		log.Fatalln("error while setup config", err)
	}

	log.Println(serverConfig)

}

About

A golang package that reads the contents of the config.ini file into a structure

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages