mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-13 20:24:00 +02:00
@@ -18,6 +18,7 @@ import (
|
||||
"encoding/csv"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/gohugoio/hugo/common/herrors"
|
||||
|
||||
@@ -39,6 +40,14 @@ type Decoder struct {
|
||||
Comment rune
|
||||
}
|
||||
|
||||
// OptionsKey is used in cache keys.
|
||||
func (d Decoder) OptionsKey() string {
|
||||
var sb strings.Builder
|
||||
sb.WriteRune(d.Delimiter)
|
||||
sb.WriteRune(d.Comment)
|
||||
return sb.String()
|
||||
}
|
||||
|
||||
// Default is a Decoder in its default configuration.
|
||||
var Default = Decoder{
|
||||
Delimiter: ',',
|
||||
|
Reference in New Issue
Block a user