Skip to content

Commit 0a994d3

Browse files
committed
update example add output
1 parent fe6f8e5 commit 0a994d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ func Foo(optionsVariableParams ...FooOptions) {
3737
func main() {
3838

3939
// 不传递参数
40-
Foo()
40+
Foo() // Output: default foo
4141

4242
// 传递参数
43-
Foo(FooOptions{Foo: "custom foo"})
43+
Foo(FooOptions{Foo: "custom foo"}) // Output: custom foo
4444

4545
}
4646
```

examples/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ func Foo(optionsVariableParams ...FooOptions) {
2424
func main() {
2525

2626
// 不传递参数
27-
Foo()
27+
Foo() // Output: default foo
2828

2929
// 传递参数
30-
Foo(FooOptions{Foo: "custom foo"})
30+
Foo(FooOptions{Foo: "custom foo"}) // Output: custom foo
3131

3232
}

0 commit comments

Comments
 (0)