mirror of https://github.com/go-python/gopy.git
gopy: add focused examples (named,iface,funcs)
Change-Id: I635f215149888e356621992504620e283de5b37c
This commit is contained in:
parent
770e51609b
commit
983aa8195c
|
@ -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
|
|
@ -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()
|
||||||
|
}
|
|
@ -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()
|
||||||
|
}
|
|
@ -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
|
Loading…
Reference in New Issue