MCPcopy Create free account
hub / github.com/koding/kite / Read

Function Read

kitekey/kitekey.go:52–62  ·  view source on GitHub ↗

Read the contents of the kite.key file.

()

Source from the content-addressed store, hash-verified

50
51// Read the contents of the kite.key file.
52func Read() (string, error) {
53 keyPath, err := kiteKeyPath()
54 if err != nil {
55 return "", err
56 }
57 data, err := ioutil.ReadFile(keyPath)
58 if err != nil {
59 return "", err
60 }
61 return strings.TrimSpace(string(data)), nil
62}
63
64// Write over the kite.key file.
65func Write(kiteKey string) error {

Callers 1

ParseFunction · 0.85

Calls 1

kiteKeyPathFunction · 0.85

Tested by

no test coverage detected