Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Commit

Permalink
fixes for reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn authored and sdboyer committed Feb 6, 2017
1 parent 9bb5c62 commit 466bb30
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmd/dep/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ type statusCommand struct {
modified bool
}

type Outputter interface {
type outputter interface {
BasicHeader()
BasicLine(*BasicStatus)
BasicFooter()
Expand Down Expand Up @@ -147,7 +147,7 @@ func (out *jsonOutput) MissingLine(ms *MissingStatus) {
}

func (out *jsonOutput) MissingFooter() {
json.NewEncoder(os.Stdout).Encode(out.missing)
json.NewEncoder(out.w).Encode(out.missing)
}

func (cmd *statusCommand) Run(ctx *dep.Ctx, args []string) error {
Expand All @@ -163,15 +163,15 @@ func (cmd *statusCommand) Run(ctx *dep.Ctx, args []string) error {
sm.UseDefaultSignalHandling()
defer sm.Release()

var out Outputter
if cmd.detailed {
var out outputter
switch {
case cmd.detailed:
return fmt.Errorf("not implemented")
}
if cmd.json {
case cmd.json:
out = &jsonOutput{
w: os.Stdout,
}
} else {
default:
out = &tableOutput{
w: tabwriter.NewWriter(os.Stdout, 0, 4, 2, ' ', 0),
}
Expand All @@ -195,7 +195,7 @@ type MissingStatus struct {
MissingPackages []string
}

func runStatusAll(out Outputter, p *dep.Project, sm *gps.SourceMgr) error {
func runStatusAll(out outputter, p *dep.Project, sm *gps.SourceMgr) error {
if p.Lock == nil {
// TODO if we have no lock file, do...other stuff
return nil
Expand Down

0 comments on commit 466bb30

Please sign in to comment.