forked from golang/pkgsite
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd4860a
commit bdf1365
Showing
3 changed files
with
453 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package overload | ||
|
||
import "fmt" | ||
|
||
const GopPackage = true | ||
|
||
const Gopo_Mul = "MulInt,,MulFloat" | ||
|
||
type N struct { | ||
} | ||
type Foo struct { | ||
} | ||
|
||
const Gopo_Foo_Division = ".DivisionInt,.DivisionFoo" | ||
|
||
// Add int | ||
func Add__0(a int, b int) int { | ||
return a + b | ||
} | ||
|
||
// Add string | ||
func Add__1(a string, b string) string { | ||
return a + b | ||
} | ||
|
||
// Mut int | ||
func MulInt(a int, b int) int { | ||
return a * b | ||
} | ||
|
||
// Mut string | ||
func Mul__1(a string, b string) string { | ||
return a + b | ||
} | ||
|
||
// Mut float | ||
func MulFloat(a float64, b float64) float64 { | ||
return a * b | ||
} | ||
|
||
func (a *Foo) DivisionInt(b int) *Foo { | ||
fmt.Println("DivisionInt") | ||
return a | ||
} | ||
|
||
func (a *Foo) DivisionFoo(b *Foo) *Foo { | ||
fmt.Println("DivisionFoo") | ||
return a | ||
} | ||
|
||
// OnKey string && fn | ||
func (m *N) OnKey__0(a string, fn func()) { | ||
} | ||
|
||
// OnKey string && fn(string) | ||
func (m *N) OnKey__1(a string, fn func(key string)) { | ||
} | ||
|
||
// OnKey string[] && fn(string) | ||
func (m *N) OnKey__2(a []string, fn func()) { | ||
} |
Oops, something went wrong.