testmain

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestFuncB1

type TestFuncB1 struct {
	// contains filtered or unexported fields
}

func (*TestFuncB1) Tx1DoSomething

func (tFuncB1 *TestFuncB1) Tx1DoSomething() error

type TestMain

type TestMain struct {
	// contains filtered or unexported fields
}

func (*TestMain) ConvertNonPrintableChars

func (tMain *TestMain) ConvertNonPrintableChars(
	nonPrintableChars []rune,
	convertSpace bool,
	ePrefix string) (
	printableChars string)

ConvertNonPrintableChars - Receives a string containing non-printable characters and converts them to 'printable' characters returned in a string.

Examples of non-printable characters are '\n', '\t' or 0x06 (Acknowledge). These example characters would be translated into printable string characters as: "\\n", "\\t" and "[ACK]".

Space characters are typically translated as " ". However, if the input parameter 'convertSpace' is set to 'true' then all spaces are converted to "[SPACE]" in the returned string.

Reference:

https://www.juniper.net/documentation/en_US/idp5.1/topics/reference/general/intrusion-detection-prevention-custom-attack-object-extended-ascii.html

------------------------------------------------------------------------

Input Parameters

nonPrintableChars   []rune
   - An array of runes containing non-printable characters.
     The non-printable characters will be converted to
     printable characters.

convertSpace        bool
   - Space or white space characters (0x20) are by default
     translated as " ". However, if this parameter is set to
     'true', space characters will be converted to "[SPACE]".

------------------------------------------------------------------------

Return Values

printableChars      string
   - This returned string is identical to input parameter
     'nonPrintableChars' with the exception that non-printable
     characters are translated into printable characters.

------------------------------------------------------------------------

Example Usage

testStr := "Hello world!\n"
testRunes := []rune(testStr)

actualStr :=
  StrOps{}.NewPtr().
    ConvertNonPrintableChars(testRunes, true)

----------------------------------------------------
'actualStr' is now equal to:
   "Hello[SPACE]world!\\n"

func (*TestMain) TestMain001

func (tMain *TestMain) TestMain001()

func (*TestMain) TestMain002

func (tMain *TestMain) TestMain002()

func (*TestMain) TestMain003

func (tMain *TestMain) TestMain003() (
	testResult string)

func (*TestMain) TestMain004

func (tMain *TestMain) TestMain004()

func (*TestMain) TestMain005

func (tMain *TestMain) TestMain005()

func (*TestMain) TestMain006

func (tMain *TestMain) TestMain006()

func (*TestMain) TestMain007

func (tMain *TestMain) TestMain007()

func (*TestMain) TestMain008

func (tMain *TestMain) TestMain008()

func (*TestMain) TestMain009

func (tMain *TestMain) TestMain009()

func (*TestMain) TestMain010

func (tMain *TestMain) TestMain010()

func (*TestMain) TestMain011

func (tMain *TestMain) TestMain011()

func (*TestMain) TestMain012

func (tMain *TestMain) TestMain012()

func (*TestMain) TestMain014

func (tMain *TestMain) TestMain014()

func (*TestMain) TestMain015

func (tMain *TestMain) TestMain015()

func (*TestMain) TestMain016

func (tMain *TestMain) TestMain016()

func (TestMain) TestMain017

func (tMain TestMain) TestMain017()

func (TestMain) TestMain018

func (tMain TestMain) TestMain018()

func (TestMain) TestMain019

func (tMain TestMain) TestMain019()

Jump to

Keyboard shortcuts

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