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

Commit 18ebb09

Browse files
authored
Merge pull request #694 from jmank88/doc_txn_writer
Document txn_writer.go
2 parents c71764f + 4af4bcd commit 18ebb09

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

txn_writer.go

+3
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ type rawStringDiff struct {
162162
*gps.StringDiff
163163
}
164164

165+
// MarshalTOML serializes the diff as a string.
165166
func (diff rawStringDiff) MarshalTOML() ([]byte, error) {
166167
return []byte(diff.String()), nil
167168
}
@@ -452,6 +453,7 @@ fail:
452453
return failerr
453454
}
454455

456+
// PrintPreparedActions logs the actions a call to Write would perform.
455457
func (sw *SafeWriter) PrintPreparedActions(output *log.Logger) error {
456458
if sw.HasManifest() {
457459
output.Printf("Would have written the following %s:\n", ManifestName)
@@ -496,6 +498,7 @@ func (sw *SafeWriter) PrintPreparedActions(output *log.Logger) error {
496498
return nil
497499
}
498500

501+
// PruneProject removes unused packages from a project.
499502
func PruneProject(p *Project, sm gps.SourceManager, logger *log.Logger) error {
500503
td, err := ioutil.TempDir(os.TempDir(), "dep")
501504
if err != nil {

0 commit comments

Comments
 (0)