MCPcopy Create free account
hub / github.com/basecamp/hey-cli / loadFromFile

Method loadFromFile

internal/auth/store.go:175–186  ·  view source on GitHub ↗
(origin string)

Source from the content-addressed store, hash-verified

173}
174
175func (s *Store) loadFromFile(origin string) (*Credentials, error) {
176 all, err := s.loadAllFromFile()
177 if err != nil {
178 return nil, err
179 }
180
181 creds, ok := all[origin]
182 if !ok {
183 return nil, fmt.Errorf("credentials not found for %s", origin)
184 }
185 return creds, nil
186}
187
188func (s *Store) saveToFile(origin string, creds *Credentials) error {
189 all, err := s.loadAllFromFile()

Callers 1

LoadMethod · 0.95

Calls 1

loadAllFromFileMethod · 0.95

Tested by

no test coverage detected