Documentation ¶
Overview ¶
package hi exposes a few Go functions to be wrapped and used from Python.
Index ¶
- Constants
- Variables
- func Add(i, j int) int
- func Concat(s1, s2 string) string
- func Hello(s string)
- func Hi()
- func LookupQuestion(n int) (string, error)
- type Couple
- type Eval
- type Float
- type Floats
- type PersIface
- type Person
- func (p *Person) GetAge() int
- func (p *Person) GetName() string
- func (p *Person) Greet() string
- func (p *Person) ReturnS2Ptr() *structs.S2
- func (p *Person) Salary(h int) (int, error)
- func (p *Person) SetAge(age int)
- func (p *Person) SetFmS2(s2 structs.S2)
- func (p *Person) SetFmS2Ptr(s2 *structs.S2)
- func (p *Person) SetName(n string)
- func (p Person) String() string
- func (p *Person) Work(h int) error
Constants ¶
View Source
const ( Version = "0.1" // Version of this package Universe = 42 // Universe is the fundamental constant of everything )
Variables ¶
View Source
var ( Debug = false // Debug switches between debug and prod Anon = Person{Age: 1, Name: "<nobody>"} // Anon is a default anonymous person IntSlice = []int{1, 2} // A slice of ints IntArray = [2]int{1, 2} // An array of ints )
Functions ¶
func LookupQuestion ¶
LookupQuestion returns question for given answer.
Types ¶
type Couple ¶
Couple is a pair of persons
type PersIface ¶ added in v0.4.3
type PersIface interface { // GetName returns the name of the person GetName() string // GetAge returns the age of the person GetAge() int // SetName sets name SetName(n string) // SetAge sets age SetAge(age int) // Greet sends greetings Greet() string }
PersIface is an interface into the person type.
func PersonAsIface ¶ added in v0.4.3
PersonAsIface creates a new person as a PersIface interface
type Person ¶
Person is a simple struct
func NewActivePerson ¶
NewActivePerson creates a new Person with a certain amount of work done.
func NewPersonWithAge ¶
NewPersonWithAge creates a new Person with a specific age
func (*Person) ReturnS2Ptr ¶ added in v0.4.3
func (*Person) SetFmS2Ptr ¶ added in v0.4.3
Click to show internal directories.
Click to hide internal directories.