Fixed megacheck linter complaints

This commit is contained in:
Eduard Urbach 2018-06-30 16:50:53 +09:00
parent 1580e290e8
commit 3a46507196
3 changed files with 3 additions and 3 deletions

View File

@ -34,7 +34,7 @@ func Get(ctx *aero.Context) string {
weekdayIndex := int(now.Weekday()) weekdayIndex := int(now.Weekday())
// Create days // Create days
days := make([]*utils.CalendarDay, 7, 7) days := make([]*utils.CalendarDay, 7)
for i := 0; i < 7; i++ { for i := 0; i < 7; i++ {
days[i] = &utils.CalendarDay{ days[i] = &utils.CalendarDay{

View File

@ -29,7 +29,7 @@ func GetPostsByUser(ctx *aero.Context) string {
posts = posts[:postLimit] posts = posts[:postLimit]
} }
postables = make([]arn.Postable, len(posts), len(posts)) postables = make([]arn.Postable, len(posts))
for i, post := range posts { for i, post := range posts {
postables[i] = arn.ToPostable(post) postables[i] = arn.ToPostable(post)

View File

@ -23,7 +23,7 @@ func Get(ctx *aero.Context) string {
// Fetch posts // Fetch posts
postObjects := arn.DB.GetMany("Post", thread.Posts) postObjects := arn.DB.GetMany("Post", thread.Posts)
posts := make([]*arn.Post, len(postObjects), len(postObjects)) posts := make([]*arn.Post, len(postObjects))
for i, obj := range postObjects { for i, obj := range postObjects {
posts[i] = obj.(*arn.Post) posts[i] = obj.(*arn.Post)