gopy: add focused examples (named,iface,funcs)

Change-Id: I635f215149888e356621992504620e283de5b37c
This commit is contained in:
Sebastien Binet 2015-08-07 09:23:09 +02:00
parent 770e51609b
commit 983aa8195c
4 changed files with 43 additions and 0 deletions

5
_examples/empty/empty.go Normal file
View File

@ -0,0 +1,5 @@
// Copyright 2015 The go-python 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 empty

15
_examples/funcs/funcs.go Normal file
View File

@ -0,0 +1,15 @@
// Copyright 2015 The go-python 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 funcs
type Func func()
type S1 struct {
F Func
}
type S2 struct {
F func()
}

9
_examples/iface/iface.go Normal file
View File

@ -0,0 +1,9 @@
// Copyright 2015 The go-python 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 iface
type Iface interface {
F()
}

14
_examples/named/named.go Normal file
View File

@ -0,0 +1,14 @@
// Copyright 2015 The go-python 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 named
type Float float32
func (f Float) Value() float32 { return float32(f) }
type X float32
type XX X
type XXX XX
type XXXX XXX