Skip to content

Commit

Permalink
Fix build errors when building with logrus
Browse files Browse the repository at this point in the history
  • Loading branch information
trhodeos committed Mar 19, 2018
1 parent bd07990 commit 1febf84
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
6 changes: 6 additions & 0 deletions cmd/spicy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"fmt"
flag "github.com/ogier/pflag"
log "github.com/sirupsen/logrus"
"github.com/trhodeos/n64rom"
"github.com/trhodeos/spicy"
"io/ioutil"
Expand Down Expand Up @@ -85,6 +86,11 @@ func main() {
flag.VarP(&includeFlags, "include", "I", includes_text)
flag.VarP(&undefineFlags, "undefine", "U", undefine_text)
flag.Parse()
if *verbose {
log.SetLevel(log.DebugLevel)
} else {
log.SetLevel(log.WarnLevel)
}
f, err := os.Open(flag.Arg(0))
if err != nil {
panic(err)
Expand Down
5 changes: 1 addition & 4 deletions cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ package spicy

import (
"bytes"
"fmt"
"github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus"
"io"
"os/exec"
"strings"
)

var log = logrus.New()

func RunCmd(command string, args ...string) error {
log.Infof("About to run %s %s\n", command, strings.Join(args, " "))
cmd := exec.Command(command, args...)
Expand Down
4 changes: 1 addition & 3 deletions entry_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ package spicy

import (
"bytes"
"github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus"
"io/ioutil"
"os"
"path/filepath"
"text/template"
)

var log = logrus.New()

func createEntrySource(bootSegment *Segment) (string, error) {
t := `
.text
Expand Down
4 changes: 1 addition & 3 deletions ld.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ package spicy
import (
"bytes"
"fmt"
"github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus"
"io/ioutil"
"os"
"path/filepath"
"text/template"
)

var log = logrus.New()

func createLdScript(w *Wave) (string, error) {
t := `
ENTRY(_start)
Expand Down

0 comments on commit 1febf84

Please sign in to comment.