MCPcopy Create free account
hub / github.com/foxcpp/maddy / parseEnhancedCode

Function parseEnhancedCode

internal/msgpipeline/config.go:359–374  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

357}
358
359func parseEnhancedCode(s string) (exterrors.EnhancedCode, error) {
360 parts := strings.Split(s, ".")
361 if len(parts) != 3 {
362 return exterrors.EnhancedCode{}, fmt.Errorf("wrong amount of enhanced code parts")
363 }
364
365 code := exterrors.EnhancedCode{}
366 for i, part := range parts {
367 num, err := strconv.Atoi(part)
368 if err != nil {
369 return code, err
370 }
371 code[i] = num
372 }
373 return code, nil
374}
375
376func parseChecksGroup(globals map[string]interface{}, node config.Node) ([]module.Check, error) {
377 var cg *CheckGroup

Callers 1

parseRejectDirectiveFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected