-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample_test.go
31 lines (28 loc) · 1.14 KB
/
example_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package annot_test
import (
"fmt"
"github.com/mrclmr/annot"
)
func Example() {
fmt.Println("The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge.")
fmt.Println(annot.String(
&annot.Annot{Col: 1, Lines: []string{"article"}},
&annot.Annot{Col: 4, ColEnd: 11, Lines: []string{"adjective"}},
&annot.Annot{Col: 22, ColEnd: 30, Lines: []string{
"facts, information, and skills acquired",
"through experience or education;",
"the theoretical or practical understanding",
"of a subject.",
}},
&annot.Annot{Col: 48, Lines: []string{"comma"}},
))
// Output:
// The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge.
// ↑ └──┬───┘ └───┬───┘ ↑
// │ └─ adjective │ └─ comma
// │ │
// └─ article └─ facts, information, and skills acquired
// through experience or education;
// the theoretical or practical understanding
// of a subject.
}