()
| 100 | } |
| 101 | |
| 102 | func ExampleDocument_CurrentLineBeforeCursor() { |
| 103 | d := &Document{ |
| 104 | Text: `Hello! my name is c-bata. |
| 105 | This is a example of Document component. |
| 106 | This component has texts displayed in terminal and cursor position. |
| 107 | `, |
| 108 | cursorPosition: len(`Hello! my name is c-bata. |
| 109 | This is a exam`), |
| 110 | } |
| 111 | fmt.Println(d.CurrentLineBeforeCursor()) |
| 112 | // Output: |
| 113 | // This is a exam |
| 114 | } |
| 115 | |
| 116 | func ExampleDocument_CurrentLineAfterCursor() { |
| 117 | d := &Document{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…