netrc

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package netrc implements GNU .netrc specification. This implementation is borrowed from the original implementation by the go authors. See https://github.com/golang/go/blob/master/src/cmd/go/internal/auth/netrc.go See https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html

Index

Constants

This section is empty.

Variables

View Source
var ErrNetrcEntryNotFound = fmt.Errorf("netrc config: entry not found")

ErrNetrcEntryNotFound is thrown if details for the machine is not found.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Machine  string
	Login    string
	Password string
}

Entry is a netrc config entry.

func Read

func Read(machine string, login string) (*Entry, error)

Read reads config for the given machine.

Jump to

Keyboard shortcuts

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