hostlist

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 5 Imported by: 0

README

Hostlist

This package provides hostlist expansion for host specifications like n[1-2],m[1,2] or n[1-2]-p,n[1,2]-q. The content of the [] can be a mixture of comma-separated entries and X-Y ranges. Only a single specification of [] per entry is allowed.

While expanding to the hostlist duplicated hosts are removed, so n[1-2],n[1,2] (twice the same specification) results in [n1, n2]. Zeros in the range specifications are preserved: n[01-04,06-07,09] -> [n01, n02, n03, n04, n06, n07, n09]

Invalid specifications:

  • More than one - in a range: [1-2-2]
  • Only increasing ranges, no [2-1]
  • Other symbols than - and , in [] are not allowed, e.g. @

Documentation

Overview

Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. This file is part of cc-lib. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. additional authors: Holger Obermaier (NHR@KIT)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand

func Expand(in string) (result []string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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