MCPcopy
hub / github.com/windtf/wireproxy / parseHTTPConfig

Function parseHTTPConfig

config.go:437–459  ·  view source on GitHub ↗
(section *ini.Section)

Source from the content-addressed store, hash-verified

435}
436
437func parseHTTPConfig(section *ini.Section) (RoutineSpawner, error) {
438 config := &HTTPConfig{}
439
440 bindAddress, err := parseString(section, "BindAddress")
441 if err != nil {
442 return nil, err
443 }
444 config.BindAddress = bindAddress
445
446 username, _ := parseString(section, "Username")
447 config.Username = username
448
449 password, _ := parseString(section, "Password")
450 config.Password = password
451
452 certFile, _ := parseString(section, "CertFile")
453 config.CertFile = certFile
454
455 keyFile, _ := parseString(section, "KeyFile")
456 config.KeyFile = keyFile
457
458 return config, nil
459}
460
461func parseResolveConfig(section *ini.Section) (*ResolveConfig, error) {
462 config := &ResolveConfig{}

Callers

nothing calls this directly

Calls 1

parseStringFunction · 0.85

Tested by

no test coverage detected