e12f0f84a1
* Test: Asymmetrical unmarshal API
* Test: Symmetric marshal API
* Revert "Test: Symmetric marshal API"
This reverts commit f51c64a797.
* Cleanup test example and add SourceUnitUnmarshaller interface
* Add CommonSourceUnit implementation
* Update comments
* Remove UnmarshalJSON
13 lines
316 B
Go
13 lines
316 B
Go
package sources
|
|
|
|
// CommonSourceUnit is a common implementation of SourceUnit that Sources can
|
|
// use instead of implementing their own types.
|
|
type CommonSourceUnit struct {
|
|
ID string `json:"source_unit_id"`
|
|
}
|
|
|
|
// Implement the SourceUnit interface.
|
|
func (c CommonSourceUnit) SourceUnitID() string {
|
|
return c.ID
|
|
}
|