(comment string)
| 990 | var validCommentRegexp *regexp.Regexp = regexp.MustCompile("^[\\w .?]*$") |
| 991 | |
| 992 | func isValidComment(comment string) bool { |
| 993 | return validCommentRegexp.MatchString(comment) |
| 994 | } |
| 995 | |
| 996 | func writeComment(comment string, buf *bytes.Buffer) error { |
| 997 | if comment != "" { |