parse

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: BSD-3-Clause Imports: 5 Imported by: 3

Documentation

Index

Constants

View Source
const C = "\"C\""

Variables

This section is empty.

Functions

func IsGeneratedFileByComment

func IsGeneratedFileByComment(in string) bool

IsGeneratedFileByComment reports whether the source file is generated code. Using a bit laxer rules than https://golang.org/s/generatedcode to match more generated code. Taken from https://github.com/golangci/golangci-lint.

Types

type GciImports

type GciImports struct {
	// original index of import group, include doc, name, path and comment
	Start, End int
	Name, Path string
}

type ImportList

type ImportList []*GciImports

func ParseFile

func ParseFile(src []byte, filename string) (ImportList, int, int, int, int, error)

func (ImportList) Len

func (l ImportList) Len() int

func (ImportList) Less

func (l ImportList) Less(i, j int) bool

func (ImportList) Swap

func (l ImportList) Swap(i, j int)

type NoImportError

type NoImportError struct{}

func (NoImportError) Error

func (n NoImportError) Error() string

func (NoImportError) Is

func (i NoImportError) Is(err error) bool

Jump to

Keyboard shortcuts

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