github.com/liquid-dev/text@v0.3.3-liquid/message/catalog/gopre19.go (about)

     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  
     5  // +build !go1.9
     6  
     7  package catalog
     8  
     9  import "github.com/liquid-dev/text/internal/catmsg"
    10  
    11  // A Message holds a collection of translations for the same phrase that may
    12  // vary based on the values of substitution arguments.
    13  type Message interface {
    14  	catmsg.Message
    15  }
    16  
    17  func firstInSequence(m []Message) catmsg.Message {
    18  	a := []catmsg.Message{}
    19  	for _, m := range m {
    20  		a = append(a, m)
    21  	}
    22  	return catmsg.FirstOf(a)
    23  }