gfmt

package
v0.0.0-...-ee6dd69 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2017 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	// Name file name
	Name string
	// Diff instead of rewriting file
	Diff    string
	NeedFmt bool
}

File need format go file

type Report

type Report struct {
	Files   []*File
	GoFmt   string
	Created time.Time
	Cost    float32
	Env     struct {
		GoVersion string
		OS        string
		Arch      string
	}
	SysErr error
}

Report gofmt result

func (*Report) ToJunit

func (r *Report) ToJunit() (formater.JUnitTestSuites, error)

ToJunit convert Report to JUnit test suites. Just add need format go file as test case in Junit. and the failure type is Warning

type Service

type Service struct {
	Report

	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(ctx *context.Context, errh errHander) (*Service, error)

func (*Service) Run

func (s *Service) Run() error

Run go fmt

func (*Service) Stop

func (s *Service) Stop() error

func (*Service) Wait

func (s *Service) Wait() error

Jump to

Keyboard shortcuts

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