()
| 26 | ) |
| 27 | |
| 28 | func main() { |
| 29 | ctx := context.Background() |
| 30 | |
| 31 | textParser := parser.TextParser{} |
| 32 | docs, err := textParser.Parse(ctx, strings.NewReader("hello world")) |
| 33 | if err != nil { |
| 34 | logs.Errorf("TextParser{}.Parse failed, err=%v", err) |
| 35 | return |
| 36 | } |
| 37 | |
| 38 | logs.Infof("text content: %v", docs[0].Content) |
| 39 | } |