ascii

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

package ascii implements an ASCII key-value parser and writer

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntFromDecimal added in v0.1.14

func IntFromDecimal(s string) (uint64, error)

Basic value types

func WriteHash added in v0.1.6

func WriteHash(w io.Writer, name string, h *crypto.Hash) error

func WriteInt added in v0.1.6

func WriteInt(w io.Writer, name string, i uint64) error

Redundant, except for beter type checking.

func WriteLine added in v0.1.6

func WriteLine(w io.Writer, key string, first interface{}, rest ...interface{}) error

func WritePublicKey added in v0.1.6

func WritePublicKey(w io.Writer, name string, k *crypto.PublicKey) error

func WriteSignature added in v0.1.6

func WriteSignature(w io.Writer, name string, s *crypto.Signature) error

Types

type Parser added in v0.1.6

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

func NewParser added in v0.1.6

func NewParser(input io.Reader) Parser

func (*Parser) GetEOF added in v0.1.6

func (p *Parser) GetEOF() error

func (*Parser) GetHash added in v0.1.6

func (p *Parser) GetHash(name string) (crypto.Hash, error)

func (*Parser) GetInt added in v0.1.6

func (p *Parser) GetInt(name string) (uint64, error)

func (*Parser) GetPublicKey added in v0.1.6

func (p *Parser) GetPublicKey(name string) (crypto.PublicKey, error)

func (*Parser) GetSignature added in v0.1.6

func (p *Parser) GetSignature(name string) (crypto.Signature, error)

func (*Parser) GetValues added in v0.1.6

func (p *Parser) GetValues(name string, count int) ([]string, error)

Jump to

Keyboard shortcuts

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