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

Unified Diff: third_party/go/src/golang.org/x/mobile/bind/bind.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 side-by-side diff with in-line comments
Download patch
Index: third_party/go/src/golang.org/x/mobile/bind/bind.go
diff --git a/third_party/go/src/golang.org/x/mobile/bind/bind.go b/third_party/go/src/golang.org/x/mobile/bind/bind.go
deleted file mode 100644
index 51bc34cca85ab1df735b958b0b96bad8abc185e1..0000000000000000000000000000000000000000
--- a/third_party/go/src/golang.org/x/mobile/bind/bind.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2014 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 bind implements a code generator for gobind.
-//
-// See the documentation on the gobind command for usage details.
-package bind // import "golang.org/x/mobile/bind"
-
-// TODO(crawshaw): slice support
-// TODO(crawshaw): channel support
-
-import (
- "bytes"
- "go/format"
- "go/token"
- "io"
-
- "golang.org/x/tools/go/types"
-)
-
-// GenJava generates a Java API from a Go package.
-func GenJava(w io.Writer, fset *token.FileSet, pkg *types.Package) error {
- buf := new(bytes.Buffer)
- g := &javaGen{
- printer: &printer{buf: buf, indentEach: []byte(" ")},
- fset: fset,
- pkg: pkg,
- }
- if err := g.gen(); err != nil {
- return err
- }
- _, err := io.Copy(w, buf)
- return err
-}
-
-// GenGo generates a Go stub to support foreign language APIs.
-func GenGo(w io.Writer, fset *token.FileSet, pkg *types.Package) error {
- buf := new(bytes.Buffer)
- g := &goGen{
- printer: &printer{buf: buf, indentEach: []byte("\t")},
- fset: fset,
- pkg: pkg,
- }
- if err := g.gen(); err != nil {
- return err
- }
- src := buf.Bytes()
- srcf, err := format.Source(src)
- if err != nil {
- w.Write(src) // for debugging
- return err
- }
- _, err = w.Write(srcf)
- return err
-}
« no previous file with comments | « third_party/go/src/golang.org/x/mobile/audio/audio_test.go ('k') | third_party/go/src/golang.org/x/mobile/bind/bind_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698