Popularity
1.4
Growing
Activity
0.0
Stable
9
1
3
Programming language: Go
License: Apache License 2.0
Tags:
Miscellaneous
Latest version: v1.0.1
hostutils alternatives and similar packages
Based on the "Miscellaneous" category.
Alternatively, view hostutils alternatives based on common mentions on social networks and blogs.
-
go-formatter
Implements replacement fields surrounded by curly braces {} format strings. -
golang-standards/project-layout
Set of common historical and emerging project layout patterns in the Go ecosystem. -
gopsutil
A cross-platform library for retrieving process and system utilization(CPU, Memory, Disks, etc). -
go.uuid
Implementation of Universally Unique Identifier (UUID). Supported both creation and parsing of UUIDs. -
archiver
Library and command for making and extracting .zip and .tar.gz archives -
fx
A dependency injection based application framework for Go (built on top of dig). -
go-multierror
A Go (golang) package for representing a list of errors as a single error. -
base64Captcha
Base64captch supports digit, number, alphabet, arithmetic, audio and digit-alphabet captcha. -
modern-go-application
Go application boilerplate and example applying modern practices. -
xstrings
A collection of useful string functions ported from other languages. -
notify
File system event notification library with simple API, similar to os/signal. -
go-shortid
Distributed generation of super short, unique, non-sequential, URL friendly IDs. -
go-restful-api
An idiomatic Go RESTful API starter kit following SOLID principles and Clean Architecture with a common project layout. -
cookiecutter-golang
A Go application boilerplate template for quick starting projects following production best practices. -
wuid
An extremely fast unique number generator, 10-135 times faster than UUID. -
conv
Package conv provides fast and intuitive conversions across Go types. -
gotoprom
Type-safe metrics builder wrapper library for the official Prometheus client. -
shoutrrr
Notification library providing easy access to various messaging services like slack, mattermost, gotify and smtp among others. -
Tideland Go
The Tideland Go Library contains a larger set of useful Google Go packages for different purposes. -
healthcheck
An opinionated and concurrent health-check HTTP handler for RESTful services. -
go-sarah
A framework to build bot for desired chat services including LINE, Slack, Gitter and more. -
container
A powerful IoC Container with fluent and easy-to-use interface. -
stats
Monitors Go MemStats + System stats such as Memory, Swap and CPU and sends via UDP anywhere you want for logging etc... -
scaffold
Scaffold generates starter Go project layout. Lets you focus on business logic implemeted.
Scout APM - Leading-edge performance monitoring starting at $39/month
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of hostutils or a related project?
README
hostutils
A golang library for packing and unpacking hosts list
Install
go get github.com/Wing924/hostutils
Examples
package main
import (
"fmt"
"github.com/Wing924/hostutils"
)
func main() {
// Pack
pack1 := hostutils.Pack([]string{"example101z.com", "example102z.com", "example103z.com"})
fmt.Println(pack1) // [example[101-103]z.com]
pack2 := hostutils.Pack([]string{"example101z.com", "example102z.com", "example201z.com"})
fmt.Println(pack2) // [example[101-102,201]z.com]
pack3 := hostutils.Pack([]string{"example01z.com example02z.com"})
fmt.Println(pack3) // [example[01-02]z.com]
// Unpack
unpack1 := hostutils.Unpack([]string{"example[101-103]z.com"})
fmt.Println(unpack1) // [example101z.com example102z.com example103z.com]
unpack2 := hostutils.Unpack([]string{"example[1-2][101-102]z.com"})
fmt.Println(unpack2) // [example1101z.com example1102z.com example2101z.com example2102z.com]
}
Functions
func Normalize(hosts []string) (packedHosts []string)
Normalize Unpack and pack hosts
func NormalizeString(hosts string) (packedHosts []string)
NormalizeString Unpack and pack hosts
func Pack(hosts []string) (packedHosts []string)
Pack Pack full hosts list into short abbreviated hosts.
func PackString(hosts string) (packedHosts []string)
PackString Pack space septated full hosts list into short abbreviated
hosts.
func Unpack(packedHosts []string) (hosts []string)
Unpack Unpack short abbreviated hosts into full hosts list.
func UnpackString(packedHosts string) (hosts []string)
Unpack Unpack space septated short abbreviated hosts into full hosts
list.
*Note that all licence references and agreements mentioned in the hostutils README section above
are relevant to that project's source code only.