Skip to content

Commit

Permalink
Removed dead code
Browse files Browse the repository at this point in the history
writeFile function is duplicate of writeFile in fs.go (removed in ee9843c)
rawLockDiff struct introduced in 34bbce0 and never used
  • Loading branch information
gregory-m committed May 24, 2017
1 parent fe4b78c commit 07f165c
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions txn_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@ func (diff rawStringDiff) MarshalTOML() ([]byte, error) {
return []byte(diff.String()), nil
}

type rawLockDiff struct {
*gps.LockDiff
}

type rawLockedProjectDiff struct {
Name gps.ProjectRoot `toml:"name"`
Source *rawStringDiff `toml:"source,omitempty"`
Expand Down Expand Up @@ -572,22 +568,6 @@ func calculatePrune(vendorDir string, keep []string) ([]string, error) {
return toDelete, err
}

func writeFile(path string, in toml.Marshaler) error {
f, err := os.Create(path)
if err != nil {
return err
}
defer f.Close()

s, err := in.MarshalTOML()
if err != nil {
return err
}

_, err = f.Write(s)
return err
}

func deleteDirs(toDelete []string) error {
// sort by length so we delete sub dirs first
sort.Sort(byLen(toDelete))
Expand Down

0 comments on commit 07f165c

Please sign in to comment.