aboutsummaryrefslogtreecommitdiffstats
path: root/bug/with_snapshot.go
diff options
context:
space:
mode:
Diffstat (limited to 'bug/with_snapshot.go')
-rw-r--r--bug/with_snapshot.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/bug/with_snapshot.go b/bug/with_snapshot.go
index 9b706d61..0474cac7 100644
--- a/bug/with_snapshot.go
+++ b/bug/with_snapshot.go
@@ -1,6 +1,8 @@
package bug
-import "github.com/MichaelMure/git-bug/repository"
+import (
+ "github.com/MichaelMure/git-bug/repository"
+)
var _ Interface = &WithSnapshot{}
@@ -10,11 +12,10 @@ type WithSnapshot struct {
snap *Snapshot
}
-// Snapshot return the current snapshot
-func (b *WithSnapshot) Snapshot() *Snapshot {
+func (b *WithSnapshot) Compile() *Snapshot {
if b.snap == nil {
snap := b.Bug.Compile()
- b.snap = &snap
+ b.snap = snap
}
return b.snap
}