helpers

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package helpers contains some basic helper functions for stark.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDir

func CheckDir(dir string) error

CheckDir is a function to check that a directory exists and tries to make it if it doesn't.

func CheckFileExists

func CheckFileExists(filename string) bool

CheckFileExists checks a returns true if a file exists and is not a directory.

func CheckTimeStamp

func CheckTimeStamp(old, new *timestamppb.Timestamp) bool

CheckTimeStamp will return true if the new protobuf timestamp is more recent than the old one.

func IsPublicIPv4

func IsPublicIPv4(ip net.IP) bool

IsPublicIPv4 returns true if the given ip is not reserved for a private address. of course, this only implies that it _might_ be public https://stackoverflow.com/a/41670589

func StdinAvailable

func StdinAvailable() bool

StdinAvailable checks if STDIN is available for reading.

Types

This section is empty.

Jump to

Keyboard shortcuts

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