analyze

package
v0.0.0-...-4b497b0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2014 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDepFile

func ParseDepFile(content []byte) ([]string, []string)

parse a "target: dep" file.

Types

type Command

type Command struct {
	Deps      []string
	Dir       string
	Target    string
	Reads     []string
	Writes    []string
	Deletions []string
	Time      time.Time
	Duration  time.Duration
	Command   string
	Filename  string
	// contains filtered or unexported fields
}

func ReadDir

func ReadDir(dir string, depRe *regexp.Regexp) ([]*Command, error)

func (*Command) ID

func (a *Command) ID() string

type Error

type Error interface {
	HTML(g *Graph) string
}

type Graph

type Graph struct {
	TargetByWrite  map[*String]*Target
	TargetByName   map[*String]*Target
	CommandByID    map[*String]*Command
	CommandByWrite map[string]*Command
	Errors         []Error
	UsedEdges      map[edge]struct{}
	// contains filtered or unexported fields
}

func NewGraph

func NewGraph(anns []*Command) *Graph

func (*Graph) Intern

func (g *Graph) Intern(s string) *String

func (*Graph) Lookup

func (g *Graph) Lookup(s string) *String

func (*Graph) Serve

func (g *Graph) Serve(addr string) error

func (*Graph) ServeCommand

func (g *Graph) ServeCommand(w http.ResponseWriter, req *http.Request)

func (*Graph) ServeErrors

func (g *Graph) ServeErrors(w http.ResponseWriter, req *http.Request)

func (*Graph) ServeRoot

func (g *Graph) ServeRoot(w http.ResponseWriter, req *http.Request)

func (*Graph) ServeTarget

func (g *Graph) ServeTarget(w http.ResponseWriter, req *http.Request)

func (*Graph) ServeTargets

func (g *Graph) ServeTargets(w http.ResponseWriter, req *http.Request)

type String

type String struct {
	// contains filtered or unexported fields
}

String is an interned string.

func (*String) String

func (s *String) String() string

type Target

type Target struct {
	Name     *String
	Reads    map[*String]struct{}
	Deps     map[*String]struct{}
	Writes   map[*String]struct{}
	Duration time.Duration
	Commands []*Command
	Errors   []Error
}

func (*Target) Start

func (a *Target) Start() time.Time

Jump to

Keyboard shortcuts

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