Help us shape the future of Go! Take the 2026 Go Developer Survey

cpp

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTestFile

func IsTestFile(filePath string) bool

IsTestFile reports whether the given C++ path is a test file.

func ResolveCppIncludePath

func ResolveCppIncludePath(sourceFile, includePath string, suppliedFiles map[string]bool) []string

ResolveCppIncludePath resolves a C++ include path to possible file paths.

func ResolveCppProjectIncludes

func ResolveCppProjectIncludes(
	absPath string,
	filePath string,
	suppliedFiles map[string]bool,
	contentReader vcs.ContentReader,
) ([]string, error)

Types

type Include

type Include struct {
	Path string
	Kind IncludeKind
}

Include represents a C++ include directive.

func CppIncludes

func CppIncludes(filePath string) ([]Include, error)

CppIncludes parses a C++ file and returns its includes.

func ParseCppIncludes

func ParseCppIncludes(sourceCode []byte) ([]Include, error)

ParseCppIncludes parses C++ source code and extracts includes.

type IncludeKind

type IncludeKind int

IncludeKind distinguishes between system and local includes.

const (
	IncludeLocal IncludeKind = iota
	IncludeSystem
)

type Provider added in v0.27.0

type Provider struct{}

func (Provider) Extensions added in v0.27.0

func (Provider) Extensions() []string

func (Provider) IsTestFile added in v0.27.0

func (Provider) IsTestFile(filePath string, _ vcs.ContentReader) bool

func (Provider) Maturity added in v0.27.0

func (Provider) Maturity() moduleapi.MaturityLevel

func (Provider) Name added in v0.27.0

func (Provider) Name() string

func (Provider) NewResolver added in v0.27.0

func (Provider) NewResolver(ctx *moduleapi.Context, contentReader vcs.ContentReader) moduleapi.Resolver

Jump to

Keyboard shortcuts

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