diff options
| author | Carlos Martín Nieto <[email protected]> | 2017-07-08 22:53:50 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2017-07-08 22:53:50 +0200 |
| commit | 7f685a6ee64db446a8b2d05f98796a1bf63984d9 (patch) | |
| tree | 33b854a6d53286232e0d6c3b91a12af9f3d25261 /object.go | |
| parent | 2cff3f2ef4828c755a545e5abacd3d7b2da3fc6d (diff) | |
Add Objecer interface
We do want to be able to accept generic objects in functions. Add this interface
so we can accept that instead of specific object types.
Diffstat (limited to 'object.go')
| -rw-r--r-- | object.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -26,6 +26,11 @@ type Object struct { repo *Repository } +// Objecter lets us accept any kind of Git object in functions. +type Objecter interface { + AsObject() *Object +} + func (t ObjectType) String() string { switch t { case ObjectAny: |
