gomodreplace

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

README

gomodreplace

A linter that handle replace directives into go.mod

Features:

  • ban all replace directives
  • allow only local replace directives
  • allow only some replace directives

Documentation

Overview

Package gomodreplace a linter that handle `replace` directives into `go.mod`

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetModuleFile

func GetModuleFile() (*modfile.File, error)

GetModuleFile gets module file.

Types

type Options

type Options struct {
	AllowList  []string
	AllowLocal bool
}

Options the analyzer options.

type Result

type Result struct {
	Reason string
	Start  token.Position
	End    token.Position
}

Result the analysis result.

func Analyze

func Analyze(opts Options) ([]Result, error)

Analyze analyzes a project.

func (Result) String

func (r Result) String() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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