mirror of
https://github.com/mainnika/nikita-tokarch-uk.git
synced 2026-05-25 01:03:35 +00:00
Add yandex metrica tag
This commit is contained in:
@@ -23,6 +23,10 @@ type Content struct {
|
||||
PostsPerPage int `mapstructure:"postsPerPage"`
|
||||
}
|
||||
|
||||
type Site struct {
|
||||
YandexKey string `mapstructure:"yandexKey"`
|
||||
}
|
||||
|
||||
// Config contains application configuration
|
||||
type Config struct {
|
||||
Verbose string `mapstructure:"verbose"`
|
||||
@@ -30,6 +34,7 @@ type Config struct {
|
||||
Addr string `mapstructure:"addr"`
|
||||
Unix string `mapstructure:"unix"`
|
||||
Content Content `mapstructure:"content"`
|
||||
Site Site `mapstructure:"site"`
|
||||
}
|
||||
|
||||
// initialize default values on app-start
|
||||
@@ -50,6 +55,8 @@ func init() {
|
||||
pflag.String("content.pinned", "contact", "pinned page slug")
|
||||
pflag.Int("content.postsPerPage", 5, "amount of posts per page")
|
||||
|
||||
pflag.String("site.yandexKey", "", "yandex analytics key")
|
||||
|
||||
pflag.Parse()
|
||||
|
||||
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
|
||||
|
||||
Reference in New Issue
Block a user