netrc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package netrc provides functions to modify an netrc file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddConfigs

func AddConfigs(locations []string, netrc, hostPattern, jsonKeyPath string) (string, error)

AddConfigs adds a config for every new location in locations. If jsonKeyPath is an empty string, the config with use an oauth token for login.

func Load

func Load() (string, string, error)

Load loads the path and contents of the .netrc file into memory.

func Refresh

func Refresh(netrc, token string) string

Refresh updates the oauth tokens for all Artifact Registry Go endpoints.

func Save

func Save(netrc, path string) error

Save saves the .netrc file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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