File: gopre19.go

package info (click to toggle)
golang-golang-x-text 0.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 41,604 kB
  • sloc: xml: 1,022; makefile: 6
file content (23 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build !go1.9

package catalog

import "golang.org/x/text/internal/catmsg"

// A Message holds a collection of translations for the same phrase that may
// vary based on the values of substitution arguments.
type Message interface {
	catmsg.Message
}

func firstInSequence(m []Message) catmsg.Message {
	a := []catmsg.Message{}
	for _, m := range m {
		a = append(a, m)
	}
	return catmsg.FirstOf(a)
}