aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/text
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2016-10-31 16:36:17 +0000
committerNiall Sheridan <nsheridan@gmail.com>2016-10-31 16:40:08 +0000
commite0a1ccb64a637673195804513902cba6b1d4e97c (patch)
treeabc1598be28cda231d92cda8fb10b49eeb564c29 /vendor/golang.org/x/text
parent7bad329d417f19ba4aae2b4607281c2bc5df8ad7 (diff)
Update dependencies
Diffstat (limited to 'vendor/golang.org/x/text')
-rw-r--r--vendor/golang.org/x/text/internal/gen/gen.go17
-rw-r--r--vendor/golang.org/x/text/internal/ucd/ucd.go2
-rw-r--r--vendor/golang.org/x/text/unicode/cldr/base.go10
-rw-r--r--vendor/golang.org/x/text/unicode/cldr/cldr.go2
-rw-r--r--vendor/golang.org/x/text/unicode/cldr/xml.go20
-rw-r--r--vendor/golang.org/x/text/unicode/norm/readwriter.go1
6 files changed, 31 insertions, 21 deletions
diff --git a/vendor/golang.org/x/text/internal/gen/gen.go b/vendor/golang.org/x/text/internal/gen/gen.go
index 9eb2987..84c699f 100644
--- a/vendor/golang.org/x/text/internal/gen/gen.go
+++ b/vendor/golang.org/x/text/internal/gen/gen.go
@@ -85,7 +85,11 @@ func CLDRVersion() string {
// IsLocal reports whether data files are available locally.
func IsLocal() bool {
- if _, err := os.Stat(localReadmeFile()); err != nil {
+ dir, err := localReadmeFile()
+ if err != nil {
+ return false
+ }
+ if _, err = os.Stat(dir); err != nil {
return false
}
return true
@@ -130,19 +134,22 @@ var (
const permissions = 0755
-func localReadmeFile() string {
+func localReadmeFile() (string, error) {
p, err := build.Import("golang.org/x/text", "", build.FindOnly)
if err != nil {
- log.Fatalf("Could not locate package: %v", err)
+ return "", fmt.Errorf("Could not locate package: %v", err)
}
- return filepath.Join(p.Dir, "DATA", "README")
+ return filepath.Join(p.Dir, "DATA", "README"), nil
}
func getLocalDir() string {
dirMutex.Lock()
defer dirMutex.Unlock()
- readme := localReadmeFile()
+ readme, err := localReadmeFile()
+ if err != nil {
+ log.Fatal(err)
+ }
dir := filepath.Dir(readme)
if _, err := os.Stat(readme); err != nil {
if err := os.MkdirAll(dir, permissions); err != nil {
diff --git a/vendor/golang.org/x/text/internal/ucd/ucd.go b/vendor/golang.org/x/text/internal/ucd/ucd.go
index 60b27d5..309e8d8 100644
--- a/vendor/golang.org/x/text/internal/ucd/ucd.go
+++ b/vendor/golang.org/x/text/internal/ucd/ucd.go
@@ -13,7 +13,6 @@ import (
"bufio"
"bytes"
"errors"
- "fmt"
"io"
"log"
"regexp"
@@ -112,7 +111,6 @@ func (p *Parser) setError(err error) {
func (p *Parser) getField(i int) []byte {
if i >= len(p.field) {
- p.setError(fmt.Errorf("ucd: index of field %d out of bounds", i))
return nil
}
return p.field[i]
diff --git a/vendor/golang.org/x/text/unicode/cldr/base.go b/vendor/golang.org/x/text/unicode/cldr/base.go
index 2182179..2382f4d 100644
--- a/vendor/golang.org/x/text/unicode/cldr/base.go
+++ b/vendor/golang.org/x/text/unicode/cldr/base.go
@@ -2,16 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package cldr provides a parser for LDML and related XML formats.
-// This package is inteded to be used by the table generation tools
-// for the various internationalization-related packages.
-// As the XML types are generated from the CLDR DTD, and as the CLDR standard
-// is periodically amended, this package may change considerably over time.
-// This mostly means that data may appear and disappear between versions.
-// That is, old code should keep compiling for newer versions, but data
-// may have moved or changed.
-// CLDR version 22 is the first version supported by this package.
-// Older versions may not work.
package cldr
import (
diff --git a/vendor/golang.org/x/text/unicode/cldr/cldr.go b/vendor/golang.org/x/text/unicode/cldr/cldr.go
index ea3fe13..2197f8a 100644
--- a/vendor/golang.org/x/text/unicode/cldr/cldr.go
+++ b/vendor/golang.org/x/text/unicode/cldr/cldr.go
@@ -5,7 +5,7 @@
//go:generate go run makexml.go -output xml.go
// Package cldr provides a parser for LDML and related XML formats.
-// This package is inteded to be used by the table generation tools
+// This package is intended to be used by the table generation tools
// for the various internationalization-related packages.
// As the XML types are generated from the CLDR DTD, and as the CLDR standard
// is periodically amended, this package may change considerably over time.
diff --git a/vendor/golang.org/x/text/unicode/cldr/xml.go b/vendor/golang.org/x/text/unicode/cldr/xml.go
index 0a6e515..a1550ed 100644
--- a/vendor/golang.org/x/text/unicode/cldr/xml.go
+++ b/vendor/golang.org/x/text/unicode/cldr/xml.go
@@ -185,6 +185,11 @@ type SupplementalData struct {
Day string `xml:"day,attr"`
Territories string `xml:"territories,attr"`
} `xml:"weekendEnd"`
+ WeekOfPreference []*struct {
+ Common
+ Locales string `xml:"locales,attr"`
+ Ordering string `xml:"ordering,attr"`
+ } `xml:"weekOfPreference"`
} `xml:"weekData"`
TimeData *struct {
Common
@@ -731,6 +736,7 @@ type LDML struct {
Count string `xml:"count,attr"`
} `xml:"relativeTimePattern"`
} `xml:"relativeTime"`
+ RelativePeriod []*Common `xml:"relativePeriod"`
} `xml:"field"`
} `xml:"fields"`
TimeZoneNames *TimeZoneNames `xml:"timeZoneNames"`
@@ -801,6 +807,14 @@ type LDML struct {
Noexpr []*Common `xml:"noexpr"`
} `xml:"messages"`
} `xml:"posix"`
+ CharacterLabels *struct {
+ Common
+ CharacterLabelPattern []*struct {
+ Common
+ Count string `xml:"count,attr"`
+ } `xml:"characterLabelPattern"`
+ CharacterLabel []*Common `xml:"characterLabel"`
+ } `xml:"characterLabels"`
Segmentations *struct {
Common
Segmentation []*struct {
@@ -1096,7 +1110,8 @@ type Calendar struct {
Common
DateFormatItem []*struct {
Common
- Id string `xml:"id,attr"`
+ Id string `xml:"id,attr"`
+ Count string `xml:"count,attr"`
} `xml:"dateFormatItem"`
} `xml:"availableFormats"`
AppendItems []*struct {
@@ -1135,6 +1150,7 @@ type Calendar struct {
Count string `xml:"count,attr"`
} `xml:"relativeTimePattern"`
} `xml:"relativeTime"`
+ RelativePeriod []*Common `xml:"relativePeriod"`
} `xml:"field"`
} `xml:"fields"`
}
@@ -1437,4 +1453,4 @@ type Numbers struct {
}
// Version is the version of CLDR from which the XML definitions are generated.
-const Version = "29"
+const Version = "30"
diff --git a/vendor/golang.org/x/text/unicode/norm/readwriter.go b/vendor/golang.org/x/text/unicode/norm/readwriter.go
index 4fa0e04..d926ee9 100644
--- a/vendor/golang.org/x/text/unicode/norm/readwriter.go
+++ b/vendor/golang.org/x/text/unicode/norm/readwriter.go
@@ -112,7 +112,6 @@ func (r *normReader) Read(p []byte) (int, error) {
}
}
}
- panic("should not reach here")
}
// Reader returns a new reader that implements Read