Browse Source

comments fix

Umputun 5 years ago
parent
commit
774a82957d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/main.go

+ 2 - 2
app/main.go

@@ -59,7 +59,7 @@ func main() {
 	}
 
 	ctx, cancel := context.WithCancel(context.Background())
-	go func() { // catch signal and invoke graceful termination
+	go func() { // catch SIGTERM signal and invoke graceful termination
 		stop := make(chan os.Signal, 1)
 		signal.Notify(stop, os.Interrupt, syscall.SIGTERM)
 		<-stop
@@ -115,7 +115,7 @@ func format(inp string, max int) string {
 	res := striphtmltags.StripTags(inp)
 	if len([]rune(res)) > max {
 		snippet := []rune(res)[:max]
-		//go back in snippet and found first space
+		// go back in snippet and found first space
 		for i := len(snippet) - 1; i >= 0; i-- {
 			if snippet[i] == ' ' {
 				snippet = snippet[:i]