all: gofmt -w -r 'interface{} -> any' .

Updates #9687
This commit is contained in:
Bjørn Erik Pedersen
2022-03-17 22:03:27 +01:00
parent 423594e03a
commit b80853de90
342 changed files with 2118 additions and 2102 deletions

View File

@@ -49,7 +49,7 @@ type FrontMatterHandler struct {
type FrontMatterDescriptor struct {
// This the Page's front matter.
Frontmatter map[string]interface{}
Frontmatter map[string]any
// This is the Page's base filename (BaseFilename), e.g. page.md., or
// if page is a leaf bundle, the bundle folder name (ContentBaseName).
@@ -64,7 +64,7 @@ type FrontMatterDescriptor struct {
// The below are pointers to values on Page and will be modified.
// This is the Page's params.
Params map[string]interface{}
Params map[string]any
// This is the Page's dates.
Dates *resource.Dates
@@ -253,7 +253,7 @@ func expandDefaultValues(values []string, defaults []string) []string {
return out
}
func toLowerSlice(in interface{}) []string {
func toLowerSlice(in any) []string {
out := cast.ToStringSlice(in)
for i := 0; i < len(out); i++ {
out[i] = strings.ToLower(out[i])
@@ -335,7 +335,7 @@ func (f *FrontMatterHandler) createHandlers() error {
return nil
}
func setParamIfNotSet(key string, value interface{}, d *FrontMatterDescriptor) {
func setParamIfNotSet(key string, value any, d *FrontMatterDescriptor) {
if _, found := d.Params[key]; found {
return
}