MCPcopy Create free account
hub / github.com/astercloud/aster / RemoveInterface

Method RemoveInterface

pkg/asteros/asteros.go:194–204  ·  view source on GitHub ↗

RemoveInterface 移除 Interface

(name string)

Source from the content-addressed store, hash-verified

192
193// RemoveInterface 移除 Interface
194func (os *AsterOS) RemoveInterface(name string) error {
195 os.ifMu.Lock()
196 defer os.ifMu.Unlock()
197
198 if _, exists := os.interfaces[name]; !exists {
199 return ErrInterfaceNotFound
200 }
201
202 delete(os.interfaces, name)
203 return nil
204}
205
206// Serve 启动 AsterOS
207func (os *AsterOS) Serve() error {

Callers 1

TestAddInterfaceFunction · 0.80

Calls 1

deleteFunction · 0.85

Tested by 1

TestAddInterfaceFunction · 0.64