oracle

package
v0.0.0-...-2824937 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: MIT, BSD-3-Clause Imports: 28 Imported by: 0

Documentation

Overview

Package oracle contains the implementation of the oracle tool whose command-line is provided by golang.org/x/tools/cmd/oracle.

http://golang.org/s/oracle-design http://golang.org/s/oracle-user-manual

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(q *Query) error

Run runs an oracle query and populates its Fset and Result.

Types

type Query

type Query struct {
	Mode  string         // query mode ("callers", etc)
	Pos   string         // query position
	Build *build.Context // package loading configuration

	// pointer analysis options
	Scope      []string  // main packages in (*loader.Config).FromArgs syntax
	PTALog     io.Writer // (optional) pointer-analysis log file
	Reflection bool      // model reflection soundly (currently slow).

	// Populated during Run()
	Fset *token.FileSet
	// contains filtered or unexported fields
}

A Query specifies a single oracle query.

func (*Query) Serial

func (q *Query) Serial() *serial.Result

Serial returns an instance of serial.Result, which implements the {xml,json}.Marshaler interfaces so that query results can be serialized as JSON or XML.

func (*Query) WriteTo

func (q *Query) WriteTo(out io.Writer)

WriteTo writes the oracle query result res to out in a compiler diagnostic format.

Directories

Path Synopsis
Package serial defines the oracle's schema for structured data serialization using JSON, XML, etc.
Package serial defines the oracle's schema for structured data serialization using JSON, XML, etc.

Jump to

Keyboard shortcuts

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