check

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

package check checks provided Go code and reports syntax errors

Index

Constants

View Source
const (
	Hint    = MarkerSeverity(1)
	Info    = MarkerSeverity(2)
	Warning = MarkerSeverity(3)
	Error   = MarkerSeverity(8)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MarkerData

type MarkerData struct {
	Severity        MarkerSeverity `json:"severity"`
	StartLineNumber int            `json:"startLineNumber"`
	StartColumn     int            `json:"startColumn"`
	EndLineNumber   int            `json:"endLineNumber"`
	EndColumn       int            `json:"endColumn"`
	Message         string         `json:"message"`
}

MarkerData is a structure defining a problem/warning/etc. Equivalent to IMarkerData in 'monaco-editor'

type MarkerSeverity

type MarkerSeverity = int

MarkerSeverity is equivalent for MarkerSeverity type in monaco-editor

type Result

type Result struct {
	HasErrors bool         `json:"hasErrors"`
	Markers   []MarkerData `json:"markers"`
}

func Check

func Check(src string) (*Result, error)

Check checks Go code and returns check result

Jump to

Keyboard shortcuts

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