Skip to content
Snippets Groups Projects
Select Git revision
5 results Searching

storage.go

Blame
  • Forked from ai3 / tools / acmeserver
    Source project has a limited visibility.
    any_bool.go 1.84 KiB
    package jsoniter
    
    type trueAny struct {
    	baseAny
    }
    
    func (any *trueAny) LastError() error {
    	return nil
    }
    
    func (any *trueAny) ToBool() bool {
    	return true
    }
    
    func (any *trueAny) ToInt() int {
    	return 1
    }
    
    func (any *trueAny) ToInt32() int32 {
    	return 1
    }
    
    func (any *trueAny) ToInt64() int64 {
    	return 1
    }
    
    func (any *trueAny) ToUint() uint {
    	return 1
    }
    
    func (any *trueAny) ToUint32() uint32 {
    	return 1
    }
    
    func (any *trueAny) ToUint64() uint64 {
    	return 1
    }
    
    func (any *trueAny) ToFloat32() float32 {
    	return 1
    }
    
    func (any *trueAny) ToFloat64() float64 {
    	return 1
    }
    
    func (any *trueAny) ToString() string {
    	return "true"
    }
    
    func (any *trueAny) WriteTo(stream *Stream) {
    	stream.WriteTrue()
    }
    
    func (any *trueAny) Parse() *Iterator {
    	return nil
    }
    
    func (any *trueAny) GetInterface() interface{} {
    	return true
    }
    
    func (any *trueAny) ValueType() ValueType {
    	return BoolValue
    }
    
    func (any *trueAny) MustBeValid() Any {
    	return any
    }