github.com/oweisse/u-root@v0.0.0-20181109060735-d005ad25fef1/cmds/elvish/edit/eddefs/prompt.go (about) 1 package eddefs 2 3 import "github.com/u-root/u-root/cmds/elvish/edit/ui" 4 5 // Prompt is the interface for a general prompt. 6 type Prompt interface { 7 // Chan returns a prompt on which the content of the prompt is made 8 // available. 9 Chan() <-chan []*ui.Styled 10 // Update signifies that the prompt should be updated. 11 Update(force bool) 12 // Last returns the last content written to Chan. If Chan was never written, 13 // it should return some content representing an unknown prompt. 14 Last() []*ui.Styled 15 // Close releases resources associated with the prompt. 16 Close() error 17 }