otgen

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package otgen is an experimental and honestly amateur implementation of some ideas mostly misunderstood from various online blogs that have mentioned operational transformations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(opts Options) error

Types

type Options

type Options struct {
	PackageName string

	// ElementType names a type that is defined outside of the generated code.
	// The default is "rune".
	ElementType string

	// ElementName is a more readable representation of type. The default is
	// ElementType with an upper-case first letter.
	ElementName string

	BaseName string

	// SliceType names a type that is equivalent to []ElementType and is
	// defined otuside of the generated code.
	SliceType string

	// OpType names a type that will be defined in the generated code.
	OpType string

	// OpStringer may be true to indicate OpType should implement Stringer.
	//
	// Requires that SliceType also implement Stringer.
	OpStringer bool

	// DeltaType names a type that will be defined in the generated code.
	DeltaType string

	GeneratedCodeWarning string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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