1
This commit is contained in:
parent
88b284f7de
commit
5b8b5563e9
@ -4,6 +4,16 @@ type MutableXObject struct {
|
|||||||
XObject
|
XObject
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NewMxoArray() *MutableXObject {
|
||||||
|
p:= new(MutableXObject)
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewMxoObject() *MutableXObject {
|
||||||
|
p:= new(MutableXObject)
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
func (this *MutableXObject) PushXValue(val *XValue) *MutableXObject{
|
func (this *MutableXObject) PushXValue(val *XValue) *MutableXObject{
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
@ -23,3 +33,7 @@ func (this *MutableXObject) SetXObject(key string, val *XObject) *MutableXObject
|
|||||||
func (this *MutableXObject) SetMutableXObject(key string, val *MutableXObject) *MutableXObject{
|
func (this *MutableXObject) SetMutableXObject(key string, val *MutableXObject) *MutableXObject{
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *MutableXObject) AsXObject() *XObject{
|
||||||
|
return &this.XObject
|
||||||
|
}
|
||||||
|
17
sysutils.go
17
sysutils.go
@ -1,10 +1,12 @@
|
|||||||
package q5
|
package q5
|
||||||
|
|
||||||
import "os"
|
import (
|
||||||
import "net"
|
"os"
|
||||||
import "net/http"
|
"net"
|
||||||
import "time"
|
"net/http"
|
||||||
import "reflect"
|
"time"
|
||||||
|
"reflect"
|
||||||
|
)
|
||||||
|
|
||||||
func GetDaySeconds(seconds int64) int64 {
|
func GetDaySeconds(seconds int64) int64 {
|
||||||
return 0
|
return 0
|
||||||
@ -82,3 +84,8 @@ func IsNumberType(v interface{}) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func FormatUnixDateTime(sec int64) string {
|
||||||
|
strTime := time.Unix(sec, 0).Format("2006-01-02 15:04:05")
|
||||||
|
return strTime
|
||||||
|
}
|
||||||
|
12
xvalue.go
12
xvalue.go
@ -19,6 +19,18 @@ type XValue struct
|
|||||||
_val interface{}
|
_val interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NewXInt32(val int32) *XValue {
|
||||||
|
p := new(XValue)
|
||||||
|
p.SetInt32(val)
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewXString(val string) *XValue {
|
||||||
|
p := new(XValue)
|
||||||
|
p.SetString(val)
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
|
||||||
func (this *XValue) GetType() int8 {
|
func (this *XValue) GetType() int8 {
|
||||||
if this._type == XVT_UNDEFINED {
|
if this._type == XVT_UNDEFINED {
|
||||||
return XVT_INT
|
return XVT_INT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user