MCPcopy Index your code
hub / github.com/koding/kite / NewFromKiteKey

Function NewFromKiteKey

config/config.go:154–166  ·  view source on GitHub ↗

NewFromKiteKey parses the given kite key file and gives a new Config value.

(file string)

Source from the content-addressed store, hash-verified

152
153// NewFromKiteKey parses the given kite key file and gives a new Config value.
154func NewFromKiteKey(file string) (*Config, error) {
155 key, err := kitekey.ParseFile(file)
156 if err != nil {
157 return nil, err
158 }
159
160 var c Config
161 if err := c.ReadToken(key); err != nil {
162 return nil, err
163 }
164
165 return &c, nil
166}
167
168func Get() (*Config, error) {
169 c := New()

Callers

nothing calls this directly

Calls 1

ReadTokenMethod · 0.95

Tested by

no test coverage detected