resolver

package
v1.6.13 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder is a struct used to create a new resolver

func NewBuilder

func NewBuilder() *Builder

NewBuilder creates a new Builder's reference

func (*Builder) Add

func (b *Builder) Add(p kindResolver) *Builder

Add will add kindResolvers for building the resolver

func (*Builder) Build

func (b *Builder) Build() (*Resolver, error)

Build will create a new instance of a resolver

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver is a struct containing the resolvers by file kind

func (*Resolver) GetType

func (r *Resolver) GetType(filePath string) model.FileKind

GetType will analyze the filepath to determine which resolver to use

func (*Resolver) Resolve

func (r *Resolver) Resolve(filePath string, kind model.FileKind) (model.ResolvedFiles, error)

Resolve will resolve the files according to its type

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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