File tree Expand file tree Collapse file tree 3 files changed +42
-4
lines changed
Expand file tree Collapse file tree 3 files changed +42
-4
lines changed Original file line number Diff line number Diff line change 22
33このディレクトリには以下のサンプルがあります。
44
5- | file | example name | note |
6- | ----------- | -------------------| ------------------------------------------------------|
7- | basic.go | scannerop \_ basic | bufio.Scannerの基本的な使い方についてのサンプルです |
8- | custom.go | scannerop \_ custom | bufio.Scanner に 独自の bufio.SplitFunc を指定して処理するサンプルです. |
5+ | file | example name | note |
6+ | --------- | -- -------------- | ----------------------------------------------------------------------- |
7+ | basic.go | scannerop_basic | bufio.Scannerの基本的な使い方についてのサンプルです |
8+ | custom.go | scannerop_custom | bufio.Scanner に 独自の bufio.SplitFunc を指定して処理するサンプルです. |
Original file line number Diff line number Diff line change @@ -26,4 +26,22 @@ func Basic() error {
2626 fmt .Println ("END" )
2727
2828 return nil
29+
30+ /*
31+ $ task
32+ task: Task "build" is up to date
33+ task: [run] ./try-golang -onetime
34+
35+ ENTER EXAMPLE NAME: scannerop_basic
36+
37+ [Name] "scannerop_basic"
38+ Enter: helloworld
39+ helloworld
40+ Enter: quit
41+ END
42+
43+
44+ [Elapsed] 4.979184142s
45+ */
46+
2947}
Original file line number Diff line number Diff line change @@ -54,4 +54,24 @@ func Custom() error {
5454 }
5555
5656 return nil
57+
58+ /*
59+ $ task
60+ task: [build] go build .
61+ task: [run] ./try-golang -onetime
62+
63+ ENTER EXAMPLE NAME: scannerop_custom
64+
65+ [Name] "scannerop_custom"
66+ [0] hello[TAB]world[TAB]こんにちわ{TAB}世界
67+ [1] hello
68+ [1] world
69+ [1] こんにちわ{TAB}世界
70+ [2] hello[TAB]world[TAB]こんにちわ
71+ [2] 世界
72+
73+
74+ [Elapsed] 99µs
75+ */
76+
5777}
You can’t perform that action at this time.
0 commit comments