intimate/autostore_test.go

29 lines
466 B
Go
Raw Normal View History

2020-09-03 06:17:54 +00:00
package intimate
import (
"log"
"reflect"
"testing"
)
type Store struct {
}
func NewStore() *Store {
return &Store{}
}
func (store *Store) Update(obj interface{}, objfields ...interface{}) {
ov := reflect.ValueOf(obj)
ot := ov.Type()
log.Printf("%#v,%#v", ov, ot)
log.Println(reflect.Indirect(reflect.ValueOf(objfields[0])))
}
func TestAutoStore(t *testing.T) {
store := NewStore()
streamer := &Streamer{}
store.Update(streamer, streamer.Channel)
}