Mastering-Go-Second-Edition/ch11/ex_test.go
2019-01-10 22:09:57 +02:00

21 lines
215 B
Go

package ex
import (
"fmt"
)
func ExampleF1() {
fmt.Println(F1(10))
fmt.Println(F1(2))
// Output:
// 55
// 1
}
func ExampleS1() {
fmt.Println(S1("123456789"))
fmt.Println(S1(""))
// Output:
// 8
// 0
}