Skip to content

dohzya/gocritic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gocritic

gocritic is a Go library for CriticMarkup.

Note: This project is a library only, if you are looking for a CLI tool, go to gocritic-cli.

Use

The main function is gocritic.Critic, here is its full signature:

func gocritic.Critic(w io.Writer, r io.Reader, fopts ...func(*Options)) (int, error)

The fopts argument is used to specify options

A typical use is:

if _, err := gocritic.Critic(out, int); err != nil {
  // handle the error
}

To generate only the original sources:

if _, err := gocritic.Critic(out, int, gocritic.FilterOnlyOriginal); err != nil {
  // handle the error
}

About

A Go library for CriticMarkup

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages