()
| 60 | } |
| 61 | |
| 62 | func ExampleDocument_TextBeforeCursor() { |
| 63 | d := &Document{ |
| 64 | Text: `Hello! my name is c-bata. |
| 65 | This is a example of Document component. |
| 66 | This component has texts displayed in terminal and cursor position. |
| 67 | `, |
| 68 | cursorPosition: len(`Hello! my name is c-bata. |
| 69 | This is a exam`), |
| 70 | } |
| 71 | fmt.Println(d.TextBeforeCursor()) |
| 72 | // Output: |
| 73 | // Hello! my name is c-bata. |
| 74 | // This is a exam |
| 75 | } |
| 76 | |
| 77 | func ExampleDocument_TextAfterCursor() { |
| 78 | d := &Document{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…