github.com/Psiphon-Inc/goarista@v0.0.0-20160825065156-d002785f4c67/elasticsearch/mappings.go (about) 1 // Copyright (C) 2016 Arista Networks, Inc. 2 // Use of this source code is governed by the Apache License 2.0 3 // that can be found in the COPYING file. 4 5 package elasticsearch 6 7 import ( 8 "strings" 9 ) 10 11 // EscapeFieldName escapes field names for Elasticsearch 12 func EscapeFieldName(name string) string { 13 return strings.Replace(name, ".", "_", -1) 14 }