gomod

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package gomod extracts the repository URL from a go.mod module path.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RepoURL

func RepoURL(modDir string) string

RepoURL returns the HTTPS repository URL inferred from the go.mod module path found in modDir (use "." for the current directory). Returns "" when the module path does not begin with a known hosting domain (github.com, gitlab.com, codeberg.org) or when go.mod cannot be read.

Types

This section is empty.

Jump to

Keyboard shortcuts

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