func genRandomData() model.Notify { return model.Notify{ Infos: []model.Info{ model.Info{InfoId: model.InfoId(fmt.Sprintf("info%05d", rand.Intn(1000))), Type: "InProcess", TimeStamp: time.Now().Unix()}, }, Dones: []model.InfoId{ model.InfoId(fmt.Sprintf("info%05d", rand.Intn(1000))), }, InfoRoomIds: []model.RoomId{ "inte_areamanager", "inte_shopowner", }, } }
func modRandomData() { // add random n.Infos = append(n.Infos, []model.Info{model.Info{InfoId: model.InfoId(fmt.Sprintf("info%05d", rand.Intn(1000))), Type: "InProcess", TimeStamp: time.Now().Unix()}}...) }