Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ func NewMyDataHub() sabi.DataHub {
SettingDataAcc: &SettingDataAcc{DataAcc: hub},
}
}

// Since this statement does not remain in the runtime binary, it is a good idea to include it
// in actual code as a compile-time check to ensure that all methods have been fully implemented.
var _ MyData = (*MyDataHub)(nil)
```

### 5. Using logic functions and `DataHub`
Expand Down
4 changes: 4 additions & 0 deletions data-acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ func NewSampleDataHub() sabi.DataHub {
}
}

// Since this statement does not remain in the runtime binary, it is a good idea to include it
// in actual code as a compile-time check to ensure that all methods have been fully implemented.
var _ SampleData = (*SampleDataHub)(nil)

///

func TestDataHubRunUsingGlobal(t *testing.T) {
Expand Down
4 changes: 4 additions & 0 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ The following is a sample code using this framework
}
}

// Since this statement does not remain in the runtime binary, it is a good idea to include it
// in actual code as a compile-time check to ensure that all methods have been fully implemented.
var _ MyData = (*MyDataHub)(nil)

// (5) Use the logic functions and the DataHub

func init() {
Expand Down
Loading