mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
- update Application section in README
- remove param name in app.go
- add error checks in processor/block.go
- move vars from model to transact logic
- move newAsset to transact
- use ID for well-known initialisms
- move randomelement, randomnint and differentelement to transact
- remove AssertDefined
- blockTxIdsJoinedByComma: use standard library to join elements
- return nil, instead of []byte{}
- remove go routine in listen.go
- move cache to parser
- inline processor in listen.go
- move store to main package
- move util to main package
- fixed failing cache issue
- fixed staticcheck issues
- removed cache function, implemented caching in the structs and methods
Signed-off-by: Stanislav Jakuschevskij <stas@two-giants.com>
13 lines
172 B
Go
13 lines
172 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
func envOrDefault(key, defaultValue string) string {
|
|
result := os.Getenv(key)
|
|
if result == "" {
|
|
return defaultValue
|
|
}
|
|
return result
|
|
}
|