2018-05-14 10:59:18 +00:00
|
|
|
package tmpl
|
|
|
|
|
2018-12-15 04:39:50 +00:00
|
|
|
import (
|
2022-02-21 03:16:15 +00:00
|
|
|
//"reflect"
|
|
|
|
//"runtime"
|
|
|
|
//"unsafe"
|
|
|
|
"github.com/Azareal/Gosora/uutils"
|
2018-12-15 04:39:50 +00:00
|
|
|
)
|
|
|
|
|
2018-05-16 11:44:32 +00:00
|
|
|
var GetFrag = func(name string) [][]byte {
|
2022-02-21 03:16:15 +00:00
|
|
|
return nil
|
2018-05-16 11:44:32 +00:00
|
|
|
}
|
2018-12-15 04:39:50 +00:00
|
|
|
|
|
|
|
type WriteString interface {
|
2022-02-21 03:16:15 +00:00
|
|
|
WriteString(s string) (n int, err error)
|
2018-12-15 04:39:50 +00:00
|
|
|
}
|
|
|
|
|
2020-02-28 23:11:07 +00:00
|
|
|
var StringToBytes = uutils.StringToBytes
|
|
|
|
|
|
|
|
/*
|
2018-12-15 04:39:50 +00:00
|
|
|
func StringToBytes(s string) (bytes []byte) {
|
2022-02-21 03:16:15 +00:00
|
|
|
str := (*reflect.StringHeader)(unsafe.Pointer(&s))
|
|
|
|
slice := (*reflect.SliceHeader)(unsafe.Pointer(&bytes))
|
|
|
|
slice.Data = str.Data
|
2018-12-15 04:39:50 +00:00
|
|
|
slice.Len = str.Len
|
|
|
|
slice.Cap = str.Len
|
|
|
|
runtime.KeepAlive(&s)
|
|
|
|
return bytes
|
|
|
|
}
|
2020-02-28 23:11:07 +00:00
|
|
|
*/
|