first commit

This commit is contained in:
2020-10-25 10:00:59 +03:00
commit 0bd6f67397
80 changed files with 4741 additions and 0 deletions

90
input/value/empty.go Normal file
View File

@@ -0,0 +1,90 @@
package value
import (
"fmt"
"time"
"gitoa.ru/go-4devs/console/input"
)
type Empty struct{}
func (e *Empty) Append(string) error {
return fmt.Errorf("%w: in empty value", input.ErrInvalidName)
}
func (e *Empty) String() string {
return ""
}
func (e *Empty) Int() int {
return 0
}
func (e *Empty) Int64() int64 {
return 0
}
func (e *Empty) Uint() uint {
return 0
}
func (e *Empty) Uint64() uint64 {
return 0
}
func (e *Empty) Float64() float64 {
return 0
}
func (e *Empty) Bool() bool {
return false
}
func (e *Empty) Duration() time.Duration {
return 0
}
func (e *Empty) Time() time.Time {
return time.Time{}
}
func (e *Empty) Strings() []string {
return nil
}
func (e *Empty) Ints() []int {
return nil
}
func (e *Empty) Int64s() []int64 {
return nil
}
func (e *Empty) Uints() []uint {
return nil
}
func (e *Empty) Uint64s() []uint64 {
return nil
}
func (e *Empty) Float64s() []float64 {
return nil
}
func (e *Empty) Bools() []bool {
return nil
}
func (e *Empty) Durations() []time.Duration {
return nil
}
func (e *Empty) Times() []time.Time {
return nil
}
func (e *Empty) Any() interface{} {
return nil
}