Skip to content

uglyurls not support map[string]bool #12926

@akkuman

Description

@akkuman

uglyurls support is configured as map[string]bool according to the following link

  • isUglyURL := func(section string) bool {
    switch v := c.UglyURLs.(type) {
    case bool:
    return v
    case map[string]bool:
    return v[section]
    default:
    return false
    }
    }
  • "uglyurls": {
    key: "uglyurls",
    decode: func(d decodeWeight, p decodeConfig) error {
    v := p.p.Get(d.key)
    switch vv := v.(type) {
    case bool:
    p.c.UglyURLs = vv
    case string:
    p.c.UglyURLs = vv == "true"
    default:
    p.c.UglyURLs = cast.ToStringMapBool(v)
    }
    return nil
    },
    internalOrDeprecated: true,
    },

but not work

because v is maps.Params[_merge:none post:true] in p.c.UglyURLs = cast.ToStringMapBool(v), none should be clean

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions