github.com/angenalZZZ/gofunc@v0.0.0-20210507121333-48ff1be3917b/data/queue/errors.go (about) 1 package queue 2 3 import ( 4 "errors" 5 ) 6 7 var ( 8 // ErrIncompatibleType is returned when the opener type is 9 // incompatible with the stored queue type. 10 ErrIncompatibleType = errors.New("queue: Opener type is incompatible with stored queue type") 11 12 // ErrEmpty is returned when the stack or queue is empty. 13 ErrEmpty = errors.New("queue: Stack or queue is empty") 14 15 // ErrOutOfBounds is returned when the ID used to lookup an item 16 // is outside of the range of the stack or queue. 17 ErrOutOfBounds = errors.New("queue: ID used is outside range of stack or queue") 18 19 // ErrDBClosed is returned when the Close function has already 20 // been called, causing the stack or queue to close, as well as 21 // its underlying database. 22 ErrDBClosed = errors.New("queue: Database is closed") 23 )