query

package
v0.0.0-...-02fd228 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2017 License: GPL-3.0 Imports: 1 Imported by: 0

README

Codeform Querying

The query package allows you to select specific items from model.Code by name.

Documentation

Overview

Package query provides high-level code querying capabilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

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

Query represents a code query.

func New

func New() *Query

New creates a new Query.

func (*Query) Func

func (q *Query) Func(names ...string) *Query

Func specifies names of global functions to include.

func (*Query) Interface

func (q *Query) Interface(names ...string) *Query

Interface specifies names of interfaces to include.

func (*Query) Name

func (q *Query) Name(names ...string) *Query

Name specifies names of things to query for. Names are always checked first, if the names match, the item will be included.

func (*Query) Package

func (q *Query) Package(names ...string) *Query

Package specifies names of packages to include.

func (*Query) Run

func (q *Query) Run(code model.Code) (*model.Code, error)

Run executes the query on the code, returning a new model.Code.

func (*Query) Struct

func (q *Query) Struct(names ...string) *Query

Struct specifies names of structs to include.

Jump to

Keyboard shortcuts

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