package main import ( "math/rand" "github.com/mhaya/game/game_cluster/internal/constant" "github.com/mhaya/game/game_cluster/internal/mdb/eventmodels" ) func getFollowFakeData(users []*eventmodels.UserBasic) []*eventmodels.FollowEventContent { datas := make([]*eventmodels.FollowEventContent, 0, 8) for i := 0; i < count; i++ { userBasic := getUserBasic(users) eventBasic := getEventBasic() datas = append(datas, &eventmodels.FollowEventContent{ UserBasic: *userBasic, EventBasic: *eventBasic, ChannelName: func() string { if rand.Intn(2) == 1 { return string(constant.TwitterFollowName) } return string(constant.YoutubeFollowName) }(), }) } return datas }