MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / go

Method go

mitmproxy/addons/view.py:263–277  ·  view source on GitHub ↗

Go to a specified offset. Positive offests are from the beginning of the view, negative from the end of the view, so that 0 is the first flow, -1 is the last flow.

(self, offset: int)

Source from the content-addressed store, hash-verified

261 # Focus
262 @command.command("view.focus.go")
263 def go(self, offset: int) -> None:
264 """
265 Go to a specified offset. Positive offests are from the beginning of
266 the view, negative from the end of the view, so that 0 is the first
267 flow, -1 is the last flow.
268 """
269 if len(self) == 0:
270 return
271 if offset < 0:
272 offset = len(self) + offset
273 if offset < 0:
274 offset = 0
275 if offset > len(self) - 1:
276 offset = len(self) - 1
277 self.focus.flow = self[offset]
278
279 @command.command("view.focus.next")
280 def focus_next(self) -> None:

Callers 1

test_movementFunction · 0.95

Calls

no outgoing calls

Tested by 1

test_movementFunction · 0.76