hugo: Index | Files | Directories

package config

import ""


Package Files


func GetStringSlicePreserveString Uses

func GetStringSlicePreserveString(cfg Provider, key string) []string

GetStringSlicePreserveString returns a string slice from the given config and key. It differs from the GetStringSlice method in that if the config value is a string, we do not attempt to split it into fields.

type Provider Uses

type Provider interface {
    GetString(key string) string
    GetInt(key string) int
    GetBool(key string) bool
    GetStringMap(key string) map[string]interface{}
    GetStringMapString(key string) map[string]string
    GetStringSlice(key string) []string
    Get(key string) interface{}
    Set(key string, value interface{})
    IsSet(key string) bool

Provider provides the configuration settings for Hugo.

func FromConfigString Uses

func FromConfigString(config, configType string) (Provider, error)

FromConfigString creates a config from the given YAML, JSON or TOML config. This is useful in tests.



Package config imports 3 packages (graph) and is imported by 24 packages. Updated 2018-06-12. Refresh now. Tools for package owners.