mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-23 00:39:13 +02:00
Bump git-todo-parser
This commit is contained in:
8
vendor/github.com/fsmiamoto/git-todo-parser/todo/write.go
generated
vendored
8
vendor/github.com/fsmiamoto/git-todo-parser/todo/write.go
generated
vendored
@ -5,9 +5,9 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func Write(f io.Writer, todos []Todo) error {
|
||||
func Write(f io.Writer, todos []Todo, commentChar byte) error {
|
||||
for _, todo := range todos {
|
||||
if err := writeTodo(f, todo); err != nil {
|
||||
if err := writeTodo(f, todo, commentChar); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@ -15,7 +15,7 @@ func Write(f io.Writer, todos []Todo) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func writeTodo(f io.Writer, todo Todo) error {
|
||||
func writeTodo(f io.Writer, todo Todo, commentChar byte) error {
|
||||
var sb strings.Builder
|
||||
if todo.Command != Comment {
|
||||
sb.WriteString(todo.Command.String())
|
||||
@ -26,7 +26,7 @@ func writeTodo(f io.Writer, todo Todo) error {
|
||||
return nil
|
||||
|
||||
case Comment:
|
||||
sb.WriteString(CommentChar)
|
||||
sb.WriteByte(commentChar)
|
||||
sb.WriteString(todo.Comment)
|
||||
|
||||
case Break:
|
||||
|
Reference in New Issue
Block a user