json

package
v0.62.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: Apache-2.0 Imports: 0 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MarshalOptions

type MarshalOptions struct {
	// IncludeLocation toggles the marshaling of location information
	IncludeLocation NodeToggle
	// IncludeLocationText additionally/optionally includes the text of the location
	IncludeLocationText bool
	// ExcludeLocationFile additionally/optionally excludes the file of the location
	// Note that this is inverted (i.e. not "include" as the default needs to remain false)
	ExcludeLocationFile bool
}

MarshalOptions defines the options for JSON marshaling, currently only toggling the marshaling of location information is supported

type NodeToggle

type NodeToggle struct {
	Term           bool
	Package        bool
	Comment        bool
	Import         bool
	Rule           bool
	Head           bool
	Expr           bool
	SomeDecl       bool
	Every          bool
	With           bool
	Annotations    bool
	AnnotationsRef bool
}

NodeToggle is a generic struct to allow the toggling of settings for different ast node types

type Options

type Options struct {
	MarshalOptions MarshalOptions
}

Options defines the options for JSON operations, currently only marshaling can be configured

Jump to

Keyboard shortcuts

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