modfile

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: BSD-3-Clause Imports: 2 Imported by: 55

Documentation

Overview

Package modfile implements parsing and formatting for go.mod files.

This is now just a simple forwarding layer over golang.org/x/mod/modfile apart from the ParseGopkgIn function which doesn't exist there.

See that package for documentation.

Deprecated: use golang.org/x/mod/modfile instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoQuote

func AutoQuote(s string) string

func Format

func Format(f *FileSyntax) []byte

func IsDirectoryPath

func IsDirectoryPath(ns string) bool

func ModulePath

func ModulePath(mod []byte) string

func MustQuote

func MustQuote(s string) bool

func ParseGopkgIn

func ParseGopkgIn(path string) (root, repo, major, subdir string, ok bool)

ParseGopkgIn splits gopkg.in import paths into their constituent parts

Types

type Comment

type Comment = modfile.Comment

type CommentBlock

type CommentBlock = modfile.CommentBlock

type Comments

type Comments = modfile.Comments

type Exclude

type Exclude = modfile.Exclude

type Expr

type Expr = modfile.Expr

type File

type File = modfile.File

func Parse

func Parse(file string, data []byte, fix VersionFixer) (*File, error)

func ParseLax

func ParseLax(file string, data []byte, fix VersionFixer) (*File, error)

type FileSyntax

type FileSyntax = modfile.FileSyntax

type Go

type Go = modfile.Go

type LParen

type LParen = modfile.LParen

type Line

type Line = modfile.Line

type LineBlock

type LineBlock = modfile.LineBlock

type Module

type Module = modfile.Module

type Position

type Position = modfile.Position

type RParen

type RParen = modfile.RParen

type Replace

type Replace = modfile.Replace

type Require

type Require = modfile.Require

type VersionFixer

type VersionFixer = modfile.VersionFixer

Jump to

Keyboard shortcuts

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