diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-04-16 05:37:14 -0700 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2018-04-16 08:37:14 -0400 |
commit | 6e2cb00008cbf09e556b00f87603797fcaa47e09 (patch) | |
tree | 3c0eb55ff4226a3f024aad373140d1fb860a6404 /vendor/golang.org/x/text/cmd/gotext/extract.go | |
parent | bf24f51c4e1cc6286885460672f7f449e8c6f5ef (diff) | |
download | chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.gz chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.bz2 chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.zip |
Depenancy upgrades and movign to dep. (#8630)
Diffstat (limited to 'vendor/golang.org/x/text/cmd/gotext/extract.go')
-rw-r--r-- | vendor/golang.org/x/text/cmd/gotext/extract.go | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/vendor/golang.org/x/text/cmd/gotext/extract.go b/vendor/golang.org/x/text/cmd/gotext/extract.go deleted file mode 100644 index 103d7e600..000000000 --- a/vendor/golang.org/x/text/cmd/gotext/extract.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2016 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. - -package main - -import ( - "golang.org/x/text/message/pipeline" -) - -// TODO: -// - merge information into existing files -// - handle different file formats (PO, XLIFF) -// - handle features (gender, plural) -// - message rewriting - -func init() { - lang = cmdExtract.Flag.String("lang", "en-US", "comma-separated list of languages to process") -} - -var cmdExtract = &Command{ - Run: runExtract, - UsageLine: "extract <package>*", - Short: "extracts strings to be translated from code", -} - -func runExtract(cmd *Command, config *pipeline.Config, args []string) error { - config.Packages = args - state, err := pipeline.Extract(config) - if err != nil { - return wrap(err, "extract failed") - } - if err := state.Import(); err != nil { - return wrap(err, "import failed") - } - if err := state.Merge(); err != nil { - return wrap(err, "merge failed") - } - return wrap(state.Export(), "export failed") -} |