util

package
v0.0.0-...-0a3dc58 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2020 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Keywords = map[string]map[string]bool{
	"Rand": {
		"Float32":     true,
		"Float64":     true,
		"ExpFloat64":  true,
		"NormFloat64": true,
		"Int":         true,
		"Int31":       true,
		"Int31n":      true,
		"Int63":       true,
		"Int63n":      true,
		"Intn":        true,
		"Uint32":      true,
		"Uint64":      true,
	},
	"Time": {
		"Now":      true,
		"Date":     true,
		"Unix":     true,
		"Local":    true,
		"Location": true,
	},
	"API": {
		"Get":        true,
		"Head":       true,
		"Post":       true,
		"PostForm":   true,
		"NewRequest": true,

		"Do": true,
	},
	"SysCom": {
		"Command": true,
	},
	"ReadFile": {

		"Open":     true,
		"OpenFile": true,

		"ReadFile": true,
	},
	"RangeQuery": {
		"GetHistoryForKey": true,
		"GetQueryResult":   true,
	},
	"CrossChan": {
		"InvokeChaincode": true,
	},
}

TODO: Cover all patterns for now, only cover the functions in math/rand and time

View Source
var LibFullPath = map[string][]string{
	"Rand":       []string{"math/rand"},
	"API":        []string{"net/http"},
	"Time":       []string{"time"},
	"SysCom":     []string{"os/exec"},
	"ReadFile":   []string{"os", "io/ioutil"},
	"RangeQuery": []string{"github.com/hyperledger/fabric/core/chaincode/shim"},
	"CrossChan":  []string{"github.com/hyperledger/fabric/core/chaincode/shim"},
}

Functions

func IdName

func IdName(n ast.Node) string

func SrcLine

func SrcLine(src []byte, p token.Position) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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