Version: v0.0.0-...-7faf06e Latest Latest

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

Go to latest
Published: Sep 6, 2019 License: Apache-2.0 Imports: 1 Imported by: 0



copied from



This section is empty.


This section is empty.


This section is empty.


type InlineFix

type InlineFix struct {
	StartCol  int // zero-based
	Length    int // length of chunk to be replaced
	NewString string

type Issue

type Issue struct {
	FromLinter string
	Text       string
	IPos       token.Pos
	Pos        token.Position
	LineRange  *Range `json:",omitempty"`

	// HunkPos is used only when golangci-lint is run over a diff
	HunkPos int `json:",omitempty"`

	// Source lines of a code with the issue to show
	SourceLines []string

	// If we know how to fix the issue we can provide replacement lines
	Replacement *Replacement

func (*Issue) Column

func (i *Issue) Column() int

func (*Issue) FilePath

func (i *Issue) FilePath() string

func (*Issue) GetLineRange

func (i *Issue) GetLineRange() Range

func (*Issue) Line

func (i *Issue) Line() int

type Range

type Range struct {
	From, To int

type Replacement

type Replacement struct {
	NeedOnlyDelete bool     // need to delete all lines of the issue without replacement with new lines
	NewLines       []string // is NeedDelete is false it's the replacement lines
	Inline         *InlineFix

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL