mirror of
https://github.com/SourceFellows/gobuch.git
synced 2025-08-03 13:12:16 +02:00
initial import
This commit is contained in:
7
golang-language-samples/sampledoc/first.go
Normal file
7
golang-language-samples/sampledoc/first.go
Normal file
@ -0,0 +1,7 @@
|
||||
//Package sampledoc zeigt wie man Integer Werte addiert.
|
||||
package sampledoc
|
||||
|
||||
//Add addiert zwei Integer Werte und liefert das Ergebnis.
|
||||
func Add(first int, second int) int {
|
||||
return first + second
|
||||
}
|
12
golang-language-samples/sampledoc/first_example_test.go
Normal file
12
golang-language-samples/sampledoc/first_example_test.go
Normal file
@ -0,0 +1,12 @@
|
||||
package sampledoc
|
||||
|
||||
import "fmt"
|
||||
|
||||
func ExampleAdd() {
|
||||
|
||||
res := Add(1, 2)
|
||||
fmt.Println(res)
|
||||
|
||||
//Output: 3
|
||||
|
||||
}
|
Reference in New Issue
Block a user