gitlab.com/evatix-go/core@v1.3.55/coredata/corejson/emptyCreator.go (about) 1 package corejson 2 3 type emptyCreator struct{} 4 5 func (it emptyCreator) Result() Result { 6 return Result{} 7 } 8 9 func (it emptyCreator) ResultWithErr( 10 typeName string, 11 err error, 12 ) Result { 13 return Result{ 14 Error: err, 15 TypeName: typeName, 16 } 17 } 18 19 func (it emptyCreator) ResultPtrWithErr( 20 typeName string, 21 err error, 22 ) *Result { 23 return &Result{ 24 Error: err, 25 TypeName: typeName, 26 } 27 } 28 29 func (it emptyCreator) ResultPtr() *Result { 30 return &Result{} 31 } 32 33 func (it emptyCreator) BytesCollection() BytesCollection { 34 return BytesCollection{} 35 } 36 37 func (it emptyCreator) BytesCollectionPtr() *BytesCollection { 38 return &BytesCollection{} 39 } 40 41 func (it emptyCreator) ResultsCollection() *ResultsCollection { 42 return &ResultsCollection{ 43 Items: []Result{}, 44 } 45 } 46 47 func (it emptyCreator) ResultsPtrCollection() *ResultsPtrCollection { 48 return &ResultsPtrCollection{ 49 Items: []*Result{}, 50 } 51 } 52 53 func (it emptyCreator) MapResults() *MapResults { 54 return &MapResults{ 55 Items: map[string]Result{}, 56 } 57 }