MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / decodeBytes

Function decodeBytes

cli/pkg/ssh_config/config.go:314–330  ·  view source on GitHub ↗
(b []byte, system bool, depth uint8)

Source from the content-addressed store, hash-verified

312}
313
314func decodeBytes(b []byte, system bool, depth uint8) (c *Config, err error) {
315 defer func() {
316 if r := recover(); r != nil {
317 if _, ok := r.(runtime.Error); ok {
318 panic(r)
319 }
320 if e, ok := r.(error); ok && e == ErrDepthExceeded {
321 err = e
322 return
323 }
324 err = errors.New(r.(string))
325 }
326 }()
327
328 c = parseSSH(lexSSH(b), system, depth)
329 return c, err
330}
331
332// Config represents an SSH config file.
333type Config struct {

Callers 3

parseWithDepthFunction · 0.85
DecodeFunction · 0.85
DecodeBytesFunction · 0.85

Calls 2

parseSSHFunction · 0.85
lexSSHFunction · 0.85

Tested by

no test coverage detected