func (f *Formatter) commentMapping(comment *gc.Comment) map[string]string { var path = "" var line = "" if comment.FileRef != nil { path = comment.FileRef.Path line = fmt.Sprintf("%v", comment.FileRef.Line) } return map[string]string{ authorName: comment.Author.Name, authorEmail: comment.Author.Email, authorDateISO8601: comment.Author.Date.Format(time.RFC3339), authorDateUnix: fmt.Sprintf("%v", comment.Author.Date.Unix()), committerName: comment.Amender.Name, committerEmail: comment.Amender.Email, committerDateISO8601: comment.Amender.Date.Format(time.RFC3339), committerDateUnix: fmt.Sprintf("%v", comment.Amender.Date.Unix()), commentFull: *comment.ID, commentShort: (*comment.ID)[:7], commitFull: *comment.Commit, commitShort: (*comment.Commit)[:7], bodyContent: comment.Content, titleLine: comment.Title(), filePath: path, lineNumber: line, newLine: "\n", dividerLine: strings.Repeat("-", int(f.termWidth)), } }