utils

package
v0.4.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2020 License: GPL-3.0 Imports: 11 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearLine

func ClearLine()

ClearLine clears the current line of the terminal

func ClearScreen

func ClearScreen()

ClearScreen prints ANSI escape to flush screen

func DumpProto

func DumpProto(pb proto.Message)

DumpProto prints a protobuf message formatted

func GetBaseLayer added in v0.3.9

func GetBaseLayer(value string) (t gopacket.LayerType)

GetBaseLayer resolves a baselayer string to the gopacket.LayerType

func GetDecodeOptions added in v0.3.9

func GetDecodeOptions(value string) (o gopacket.DecodeOptions)

GetDecodeOptions resolves a decode option string to the gopacket.DecodeOptions type

func ListAllNetworkInterfaces added in v0.4.4

func ListAllNetworkInterfaces()

ListAllNetworkInterfaces dumps a list of all visible network interfaces to stdout

func Pad

func Pad(in interface{}, length int) string

Pad the input up to the given number of space characters

func Progress

func Progress(current, total int64) string

Progress display

func StringToTime

func StringToTime(val string) time.Time

StringToTime converts a seconds.micro string to a time.Time

func TimeToString

func TimeToString(t time.Time) string

TimeToString converts a time.Time to seconds.micro string

func TimeToUTC

func TimeToUTC(val string) string

TimeToUTC returns a time string in netcap format to a UTC string

func TrimFileExtension

func TrimFileExtension(file string) string

TrimFileExtension returns the netcap file name without file extension

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL