MCPcopy
hub / github.com/golang/net / remove

Method remove

html/node.go:205–214  ·  view source on GitHub ↗

remove removes a node from the stack. It is a no-op if n is not present.

(n *Node)

Source from the content-addressed store, hash-verified

203
204// remove removes a node from the stack. It is a no-op if n is not present.
205func (s *nodeStack) remove(n *Node) {
206 i := s.index(n)
207 if i == -1 {
208 return
209 }
210 copy((*s)[i:], (*s)[i+1:])
211 j := len(*s) - 1
212 (*s)[j] = nil
213 *s = (*s)[:j]
214}
215
216type insertionModeStack []insertionMode
217

Callers 4

addFormattingElementMethod · 0.45
afterHeadIMFunction · 0.45
inBodyIMFunction · 0.45

Calls 1

indexMethod · 0.95

Tested by

no test coverage detected