mappings.go 344 B

123456789101112131415
  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. package elasticsearch
  5. import (
  6. "strings"
  7. )
  8. // EscapeFieldName escapes field names for Elasticsearch
  9. func EscapeFieldName(name string) string {
  10. return strings.Replace(name, ".", "_", -1)
  11. }