cdpgen

command
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2017 License: MIT Imports: 14 Imported by: 0

README

cdpgen

The cdpgen tool is used to generate the Golang API for the Chrome Debugging Protocol from the protocol definitions (JSON).

Beware, this tool is not a feat of engineering, it's only purpose is to generate the Golang API. It has gone thourgh many revisions while prototyping the API and might contain both messy and dead code.

Installing

go get -u github.com/mafredri/cdp/cmd/cdpgen

Usage

The current protocol definitions are committed in this repository under the protodef directory.

Generating the cdp package
$ cdpgen -dest-pkg github.com/mafredri/cdp \
    -browser-proto $GOPATH/src/github.com/mafredri/cdp/cmd/cdpgen/protodef/browser_protocol.json \
    -js-proto $GOPATH/src/github.com/mafredri/cdp/cmd/cdpgen/protodef/js_protocol.json
Updating protocol definitions
$ ./update.sh

Future improvements

  • Better formatting for comments, consider sentence construction, proper casing and line length.

Documentation

Overview

The cdpgen command generates the package cdp from the provided protocol definitions.

Directories

Path Synopsis
Package lint contains a linter for Go source code.
Package lint contains a linter for Go source code.
Package proto is used to parse the CDP protocol definitions (JSON).
Package proto is used to parse the CDP protocol definitions (JSON).

Jump to

Keyboard shortcuts

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