Skip to content
/ fluentqa-gotpl Public template

fluentqa-gotpl, Template Project for Golang Project

Notifications You must be signed in to change notification settings

fluent-qa/fluentqa-gotpl

Repository files navigation

README

Golang Template project.

  • Simple Golang Template with github action
  • Simple Cli Application with MAKE file
  • [] Github Issue Template
  • [] Cli App to create different Application with template
    • [] Golang
    • [] Python
    • [] Java
  • [] Cli/Tui App to Create different Application Files

How to Build

make build-fluent

/configs

Configuration file templates or default configs.

Put your confd or consul-template template files here.

Functions and Demos

free_form="test"

[ws]
sh_home = "/bin/sh"
working_dir = "."
  1. how to get a key:
	config := NewDefaultConfig()
	fmt.Println(config)
	assert.Equal(t, config.Get("free_form"), "test")
	assert.Equal(t, config.Get("ws.sh_home"), "/bin/sh")
  1. use named config for additional configuration
	config := &AppConfig{}
	NewNamedConfig("app.toml", "named", config)
	fmt.Println(config)
	assert.Equal(t, config.Ws.ShHome, "/bin/sh")
	v := GetViperByName("named")
	//ws := v.Get("ws").(map[string]interface{})
	ws := v.Get("ws").(map[string]interface{})
	assert.Equal(t, ws["sh_home"], "/bin/sh")

About

fluentqa-gotpl, Template Project for Golang Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages