Interface implementation assertions moved outside the functions

This commit is contained in:
Emir Pasic
2022-04-13 15:04:39 +02:00
parent 363df0e21f
commit e2b92bbc7a
56 changed files with 129 additions and 185 deletions
+3 -4
View File
@@ -8,10 +8,9 @@ import (
"github.com/emirpasic/gods/containers"
)
func assertSerializationImplementation() {
var _ containers.JSONSerializer = (*Stack)(nil)
var _ containers.JSONDeserializer = (*Stack)(nil)
}
// Assert Serialization implementation
var _ containers.JSONSerializer = (*Stack)(nil)
var _ containers.JSONDeserializer = (*Stack)(nil)
// ToJSON outputs the JSON representation of the stack.
func (stack *Stack) ToJSON() ([]byte, error) {