# Datastructures and Jsoner notes
- Purpose
- Returning data at once, no manipulation further
- If return data is consumed by many then better to use a separate datastructure
```
func (....) *map[string]*XYZ
type XYZMap struct {
items *map[string]*XYZ
sync.Mutex
}
Future modify -> Add(key str, val xyz), Adds(...XYZ)
Async -> AddLock()
Common -> Length, IsEmpty, HasItems, Has(key) bool, Get(key) *xyz, Items() * map[string]*XYZ
```
## Interface
Naming convention : WhateverName + er (eg. Writer -> Writer())
CashProcessor(public methods) -> CashProcessorImpl
Transaction(gateway)
## References
* [coredata/corestr · develop · evatix-go / core · GitLab](https://gitlab.com/evatix-go/core/-/tree/develop/coredata/corestr)
* [coredata/corestr/Collection.go · develop · evatix-go / core · GitLab](https://gitlab.com/evatix-go/core/-/blob/develop/coredata/corestr/Collection.go)
* [coredata/corestr/Hashset.go · develop · evatix-go / core · GitLab](https://gitlab.com/evatix-go/core/-/blob/develop/coredata/corestr/Hashset.go)
* [coredata/corestr/Hashmap.go · develop · evatix-go / core · GitLab](https://gitlab.com/evatix-go/core/-/blob/develop/coredata/corestr/Hashmap.go)
* [coredata/corestr/CharCollectionMap.go · develop · evatix-go / core · GitLab](https://gitlab.com/evatix-go/core/-/blob/develop/coredata/corestr/CharCollectionMap.go)
```
func (....) *map[string]*XYZ
type XYZMap struct {
items *map[string]*XYZ
sync.Mutex
}
Future modify -> Add(key str, val xyz), Adds(...XYZ)
Async -> AddLock()
Common -> Length, IsEmpty, HasItems, Has(key) bool, Get(key) *xyz, Items() * map[string]*XYZ
```