gopre19.go 564 B

1234567891011121314151617181920212223
  1. // Copyright 2017 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // +build !go1.9
  5. package catalog
  6. import "golang.org/x/text/internal/catmsg"
  7. // A Message holds a collection of translations for the same phrase that may
  8. // vary based on the values of substitution arguments.
  9. type Message interface {
  10. catmsg.Message
  11. }
  12. func firstInSequence(m []Message) catmsg.Message {
  13. a := []catmsg.Message{}
  14. for _, m := range m {
  15. a = append(a, m)
  16. }
  17. return catmsg.FirstOf(a)
  18. }