gomod

package
v0.0.0-...-765d1ad Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package gomod provides utilities for getting information about the current Go module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindDir

func FindDir() (string, error)

FindDir finds the nearest directory containing a go.mod file. Checks the current dir and then walks up parent directories.

func GuessPackage

func GuessPackage(fileName string) (string, error)

GuessPackage guesses the full Go package path for a file name, relative to current working directory. Imperfect. Assumes package names always match directory names.

func ParsePath

func ParsePath() (string, error)

ParsePath finds the module path in the nearest go.mod file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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