config

package
v0.0.0-...-14f1b0a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 10, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LayoutName         string = "layout"
	LayoutFile         string = "./external/web/view/layouts/layout.html"
	ViewFileCommonPath string = "./external/web/view/views/"
)

Variables

This section is empty.

Functions

func ToPath

func ToPath(viewPath, viewName string) string

Types

type MyConfig

type MyConfig struct {
	Url       string `yaml:"url"`
	Port      string `yaml:"port"`
	SqlDriver string `yaml:"sqldriver"`
	User      string `yaml:"user"`     // 環境変数から取得
	Password  string `yaml:"password"` // 環境変数から取得
	Protocol  string `yaml:"protocol"`
	Address   string `yaml:"address"`
	DataBase  string `yaml:"database"`
}

func LoadConfig

func LoadConfig(filePath string) (config MyConfig, err error)

設定ファイルを読み込む 秘匿情報は環境変数から読み込みます https://mtyurt.net/post/go-using-environment-variables-in-configuration-files.html

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL