aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gotext.go35
1 files changed, 14 insertions, 21 deletions
diff --git a/src/gotext.go b/src/gotext.go
index b92d339..993e0f1 100644
--- a/src/gotext.go
+++ b/src/gotext.go
@@ -409,27 +409,6 @@ func run(env envT) int {
return 0
}
-func Main() {
- // parse args
- /*
- args, err := flags.ParseArgs(&opts, os.Args)
- if err != nil {
- log.Fatalf("ParseArgs failed %s", err)
- }
- */
-
- g.Init()
- args, rc := getopt(os.Args, os.Stderr)
- g.ExitIf(rc)
- os.Exit(run(envT{
- args: args,
- in: os.Stdin,
- out: os.Stdout,
- err: os.Stderr,
- }))
-
-}
-
// SetLocale sets the program's current locale.
func SetLocale(category uint, locale string) string {
clocale := C.CString(locale)
@@ -578,3 +557,17 @@ func Init(name string, localedir string) {
BindTextdomain(name, localedir);
Textdomain(name)
}
+
+
+
+func Main() {
+ g.Init()
+ args, rc := getopt(os.Args, os.Stderr)
+ g.ExitIf(rc)
+ os.Exit(run(envT{
+ args: args,
+ in: os.Stdin,
+ out: os.Stdout,
+ err: os.Stderr,
+ }))
+}