utils

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package utils contains a number of helper / utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindPortInRange

func FindPortInRange(s string) (int, error)

FindPortInRange Iterate through CSV or Range of ports to find open port Valid inputs are "8081", "8081,8085", "8081-8085". Do not combine list and range

func FormatJSONObject

func FormatJSONObject(object interface{}) string

Format a JSON document for creating Pact files.

func FormatJSONString

func FormatJSONString(object string) string

Format a JSON document to make comparison easier.

func GetFreePort

func GetFreePort() (int, error)

GetFreePort Gets an available port by asking the kernal for a random port ready and available for use.

func IsJSONFormattedObject

func IsJSONFormattedObject(stringOrObject interface{}) bool

Checks to see if someone has tried to submit a JSON string for an object, which is no longer supported

Types

This section is empty.

Jump to

Keyboard shortcuts

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