MCPcopy
hub / github.com/c-bata/go-prompt / ExampleDocument_CurrentLine

Function ExampleDocument_CurrentLine

document_test.go:10–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8)
9
10func ExampleDocument_CurrentLine() {
11 d := &Document{
12 Text: `Hello! my name is c-bata.
13This is a example of Document component.
14This component has texts displayed in terminal and cursor position.
15`,
16 cursorPosition: len(`Hello! my name is c-bata.
17This is a exam`),
18 }
19 fmt.Println(d.CurrentLine())
20 // Output:
21 // This is a example of Document component.
22}
23
24func ExampleDocument_DisplayCursorPosition() {
25 d := &Document{

Callers

nothing calls this directly

Calls 1

CurrentLineMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…