Help us shape the future of Go! Take the 2026 Go Developer Survey

trust

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package trust records which project roots the user approved to contribute their own settings layer to a run.

Index

Constants

View Source
const Version = 1

Version is the store schema version. An unrecognized version is unreadable rather than upgradable, so a later format change never has to guess whether an old file is safe.

Variables

This section is empty.

Functions

func Record

func Record(home, root string) error

func StorePath

func StorePath(home string) string

Types

type Decision

type Decision struct {
	Trusted bool
	Reason  Reason
	Root    string
}

func Lookup

func Lookup(home, projectRoot string) Decision

type Reason

type Reason string
const (
	ReasonTrusted        Reason = "trusted"
	ReasonNothingCovered Reason = "nothing_covered"
	ReasonNoRecord       Reason = "no_record"
	ReasonUnreadable     Reason = "unreadable_store"
	ReasonUnresolvedRoot Reason = "unresolved_root"
)

type Store

type Store struct {
	Version  int      `yaml:"version"`
	Projects []string `yaml:"projects"`
}

Jump to

Keyboard shortcuts

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