gotest.toolsgotest.tools/internal/source Index | Files

package source

import "gotest.tools/internal/source"

Index

Functions

func CallExprArgs

func CallExprArgs(stackIndex int) ([]ast.Expr, error)

CallExprArgs returns the ast.Expr slice for the args of an ast.CallExpr at the index in the call stack.

func FormatNode

func FormatNode(node ast.Node) (string, error)

FormatNode using go/format.Node and return the result as a string

func FormattedCallExprArg

func FormattedCallExprArg(stackIndex int, argPos int) (string, error)

FormattedCallExprArg returns the argument from an ast.CallExpr at the index in the call stack. The argument is formatted using FormatNode.

Source Files

source.go

Version
v1.4.0 (latest)
Published
Mar 21, 2018
Platform
linux/amd64
Imports
11 packages
Last checked
3 days ago

Tools for package owners.