gometered

package module
v0.0.0-...-9cf2ab0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: CC0-1.0 Imports: 5 Imported by: 0

README

go-ismetered

Check if the current network you're on is marked as metered (systemd support only at the moment)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMetered

func IsMetered() bool

Quirks: Does not preserve errors (see IsMeteredFull(), returns false apon error) Only works on systemd based machines running network manager (PRs welcome) - On systemd, it checks ALL current interfaces if they're metered and returns true if any are

func IsMeteredFull

func IsMeteredFull() (bool, error)

IsMeteredFull takes the same input as IsMetered(), however, it returns errors, so if you don't want to use the function inline and/or want to troubleshoot, use this.

Types

This section is empty.

Jump to

Keyboard shortcuts

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