ipld-eth-server/vendor/github.com/aristanetworks/goarista/elasticsearch/mappings.go

15 lines
344 B
Go
Raw Normal View History

// Copyright (c) 2016 Arista Networks, Inc.
// Use of this source code is governed by the Apache License 2.0
// that can be found in the COPYING file.
package elasticsearch
import (
"strings"
)
// EscapeFieldName escapes field names for Elasticsearch
func EscapeFieldName(name string) string {
return strings.Replace(name, ".", "_", -1)
}