Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: third_party/go/src/golang.org/x/mobile/cmd/gobind/main.go

Issue 1275153002: Remove third_party/golang.org/x/mobile as it is no longer used with Go 1.5. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Remove golang.org/x/mobile Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 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 package main
6
7 import (
8 "flag"
9 "fmt"
10 "go/build"
11 "log"
12 "os"
13 )
14
15 var (
16 lang = flag.String("lang", "java", "target language for bindings, eith er java or go.")
17 outdir = flag.String("outdir", "", "result will be written to the direct ory instead of stdout.")
18 )
19
20 var usage = `The Gobind tool generates Java language bindings for Go.
21
22 For usage details, see doc.go.`
23
24 func main() {
25 flag.Parse()
26
27 cwd, err := os.Getwd()
28 if err != nil {
29 log.Fatal(err)
30 }
31 for _, arg := range flag.Args() {
32 pkg, err := build.Import(arg, cwd, 0)
33 if err != nil {
34 fmt.Fprintf(os.Stderr, "%s: %v\n", arg, err)
35 os.Exit(1)
36 }
37 genPkg(pkg)
38 }
39 os.Exit(exitStatus)
40 }
41
42 var exitStatus = 0
43
44 func errorf(format string, args ...interface{}) {
45 fmt.Fprintf(os.Stderr, format, args...)
46 fmt.Fprintln(os.Stderr)
47 exitStatus = 1
48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698