sentinel

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2022 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package sentinel allows for the use of Unicode non-characters to distinguish between Boundary defined sentinels and values provided by external systems.

All sentinel values are prefixed with the sentinel start character U+FFFE and suffixed with the sentinel end character U+FFFF. Any string that starts with U+FFFE and ends with U+FFFF is a valid sentinel and reserved for use within Boundary.

U+FFFE and U+FFFF are special non-characters reserved for internal use in the Unicode standard. See https://www.unicode.org/versions/Unicode13.0.0/ch23.pdf#G12612.

Index

Constants

View Source
const (
	// Start is the Unicode special non-character U+FFFE, and the prefix included in all
	// Boundary defined sentinel values.
	Start = '\ufffe'

	// End is the Unicode special non-character U+FFFF, and the suffix included in all
	// Boundary defined sentinel values.
	End = '\uffff'
)
View Source
const (
	// ExternalIdNone is a Boundary sentinel indicating that no id was provided by an
	// external system.
	ExternalIdNone = "\ufffenone\uffff"
)

Variables

This section is empty.

Functions

func Is

func Is(s string) bool

Is returns true if s is a valid sentinel.

Types

This section is empty.

Jump to

Keyboard shortcuts

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