package modfile
import "github.com/rogpeppe/go-internal/modfile"
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 ¶
- func AutoQuote(s string) string
- func Format(f *FileSyntax) []byte
- func IsDirectoryPath(ns string) bool
- func ModulePath(mod []byte) string
- func MustQuote(s string) bool
- func ParseGopkgIn(path string) (root, repo, major, subdir string, ok bool)
- type Comment
- type CommentBlock
- type Comments
- type Exclude
- type Expr
- type File
- func Parse(file string, data []byte, fix VersionFixer) (*File, error)
- func ParseLax(file string, data []byte, fix VersionFixer) (*File, error)
- type FileSyntax
- type Go
- type LParen
- type Line
- type LineBlock
- type Module
- type Position
- type RParen
- type Replace
- type Require
- type VersionFixer
Functions ¶
func AutoQuote ¶
func Format ¶
func Format(f *FileSyntax) []byte
func IsDirectoryPath ¶
func ModulePath ¶
func MustQuote ¶
func ParseGopkgIn ¶
ParseGopkgIn splits gopkg.in import paths into their constituent parts
Types ¶
type Comment ¶
type CommentBlock ¶
type CommentBlock = modfile.CommentBlock
type Comments ¶
type Exclude ¶
type Expr ¶
type 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 LParen ¶
type Line ¶
type LineBlock ¶
type Module ¶
type Position ¶
type RParen ¶
type Replace ¶
type Require ¶
type VersionFixer ¶
type VersionFixer = modfile.VersionFixer
Source Files ¶
- Version
- v1.13.1
- Published
- Sep 23, 2024
- Platform
- darwin/amd64
- Imports
- 2 packages
- Last checked
- 2 hours ago –
Tools for package owners.