在扩展的端口列表中查找
(portLabel string)
| 543 | |
| 544 | // 在扩展的端口列表中查找 |
| 545 | func (portMaps ExtendPorts) Find(portLabel string) (*config.PortMapInfo, error) { |
| 546 | for _, info := range portMaps { |
| 547 | if strings.EqualFold(info.HostPortDesc, portLabel) { |
| 548 | return &info, nil |
| 549 | } |
| 550 | } |
| 551 | return nil, fmt.Errorf(fmt.Sprintf("没有查找到 %v 对应的端口信息", portLabel)) |
| 552 | } |
| 553 | |
| 554 | func (portMaps ExtendPorts) IsExit(portMapInfo *config.PortMapInfo) bool { |
| 555 | if portMapInfo == nil { |
no outgoing calls
no test coverage detected