/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
go/flexibletable/errors.go
42 строки
1 KB
Miles Steele
fix panic on empty table
07 окт 2016, 17:27
07 окт 2016, 17:27
1ced111
Код
Авторство
О чём код?
package flexibletable import "fmt" // InconsistentRowsError is an error that is returned when number of columns // are inconsistent across rows. type InconsistentRowsError struct { existingRows int newRow int } // Error implements the error interface func (e InconsistentRowsError) Error() string { return fmt.Sprintf("existing rows have %d cells but the new row has %d cells", e.existingRows, e.newRow) } // NoRowsError indicates no rows in the table. type NoRowsError struct{} // Error implements the error interface func (e NoRowsError) Error() string { return "no rows" } // WidthTooSmallError indicates the width constraints is too small. type WidthTooSmallError struct{} // Error implements the error interface func (e WidthTooSmallError) Error() string { return "width too small" } // BadOptionError indicates, well, bad options, are given. type BadOptionError struct { optionName string } // Error implements the error interface func (e BadOptionError) Error() string { return fmt.Sprintf("bad option %s", e.optionName) }