github.com/oweisse/u-root@v0.0.0-20181109060735-d005ad25fef1/xcmds/ed/types.go (about) 1 // Copyright 2012-2017 the u-root Authors. All rights reserved 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Ed is a simple line-oriented editor 6 // 7 // Synopsis: 8 // dd 9 // 10 // Description: 11 // 12 // Options: 13 package main 14 15 import "io" 16 17 type Editor interface { 18 Dot() int 19 Move(int) 20 Range() (int, int) 21 Replace([]byte, int, int) (int, error) 22 Read(io.Reader, int, int) (int, error) 23 Write(io.Writer, int, int) (int, error) 24 Sub(string, string, string, int, int) error 25 Print(io.Writer, int, int) (int, error) 26 IsDirty() bool 27 Dirty(bool) 28 Equal(f Editor) error 29 }