gen

package
v0.0.0-...-99c9ca1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package gen provides various template-based source code generators for the Chrome DevTools Protocol domain definitions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generators

func Generators() map[string]Generator

Generators returns all the various Chrome DevTools Protocol generators.

Types

type Emitter

type Emitter interface {
	Emit() map[string]*bytes.Buffer
}

Emitter is the shared interface for code emitters.

func NewGoGenerator

func NewGoGenerator(domains []*pdl.Domain, basePkg string) (Emitter, error)

NewGoGenerator creates a Go source code generator for the Chrome DevTools Protocol domain definitions.

type Generator

type Generator func([]*pdl.Domain, string) (Emitter, error)

Generator is the common interface for code generators.

type GoGenerator

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

GoGenerator generates Go source code for the Chrome DevTools Protocol.

func (*GoGenerator) Emit

func (gg *GoGenerator) Emit() map[string]*bytes.Buffer

Emit returns the generated files.

Directories

Path Synopsis
Package go contains the valyala/quicktemplate based code generation templates for Go used by cdproto-gen.
Package go contains the valyala/quicktemplate based code generation templates for Go used by cdproto-gen.

Jump to

Keyboard shortcuts

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