todos

package
v0.0.0-...-0d20692 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseGitignore

func ParseGitignore(dir string) ([]string, error)

ParseGitignore parses the .gitignore file in the specified directory and returns a slice of patterns to ignore.

func WriteFileGroup

func WriteFileGroup(w io.Writer, comments []Comment, sortby string, desc bool) error

WriteFileGroup writes the comments to the io.Writer as a file list

func WriteJSON

func WriteJSON(w io.Writer, comments []Comment, sortby string, desc bool) error

WriteJSON writes the comments to the io.Writer as JSON

func WriteMarkdown

func WriteMarkdown(w io.Writer, comments []Comment, sortby string, desc bool) error

WriteMarkdown writes the comments to the io.Writer as a markdown table

func WriteTable

func WriteTable(w io.Writer, comments []Comment, sortby string, desc bool) error

WriteTable writes the comments to the io.Writer as a table

func WriteTemplate

func WriteTemplate(w io.Writer, comments []Comment, sortby string, desc bool, sourceStr string) error

WriteTemplate writes the comments to the io.Writer using the given template

Types

type Comment

type Comment struct {
	File   string `json:"file"`
	Line   int    `json:"line"`
	Type   string `json:"type"`
	Text   string `json:"text"`
	Author string `json:"author"`
}

Comment represents a comment

func Parse

func Parse(r io.Reader, path string, commentTypes []string, permissive bool) ([]Comment, error)

Parse parses the specified file and returns a slice of comments.

func Search(dir string, commentTypes []string, ignores []string, permissive bool) ([]Comment, error)

Search searches a directory for comments

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL