checking in some WIP

* added some netx funcs
* added netx/dnsx
* currently updating docs and adding *x funcs to sprigx
This commit is contained in:
brent saner
2026-02-24 17:41:57 -05:00
parent 4770052b52
commit c6fc692f5e
14 changed files with 2773 additions and 646 deletions

View File

@@ -37,6 +37,17 @@ type (
}
)
func TestFuncsAscii(t *testing.T) {
var err error
// var s string = "This is a §\nmulti-line\nstring 😀 with\nunicode text.\n"
var s string = "This is a §\nmulti-line\nstring with\nno unicode text.\n"
if _, err = IsAscii(s, false, true); err != nil {
t.Fatal(err)
}
}
func TestRedact(t *testing.T) {
var out string
@@ -171,6 +182,18 @@ func TestRedact(t *testing.T) {
}
}
func TestReverse(t *testing.T) {
var rev string
var s string = "012345679abcdef"
rev = Reverse(s)
if rev != "fedcba976543210" {
t.Errorf("reverse of s '%s'; expected 'fedcba976543210', got '%s'", s, rev)
}
t.Logf("s: %s\nReverse: %s", s, rev)
}
func TestTrimLines(t *testing.T) {
var out string