peek

package module
v0.0.0-...-cdb8a84 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 2 Imported by: 1

README

go-peek

Package peek provides tools for peeking at input, for the Go programming language.

Documention

Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-peek

GoDoc

Example

Here is an example:

import "github.com/reiver/go-peek"

// ...

r, size, err := peek.PeekRune(runescanner)

Import

To import package peek use import code like the follownig:

import "github.com/reiver/go-peek"

Installation

To install package peek do the following:

GOPROXY=direct go get https://github.com/reiver/go-peek

Author

Package peek was written by Charles Iliya Krempeaux

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PeekRune

func PeekRune(runescanner io.RuneScanner) (r rune, size int, err error)

PeekRune returns the next rune (from the underlying io.RuneScanner) without advancing the reader. Although technically, it does temporarily advance the io.RuneScanner, and then unadvances it. PeekRune uses io.RuneScanner's ReadRune and UnreadRune to peek.

Types

This section is empty.

Jump to

Keyboard shortcuts

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