Skip to content

Commit d5077cb

Browse files
committed
refactor: stream delimited configuration parsing
Signed-off-by: daixiheguu <daixihegu@outlook.com>
1 parent 60e37a1 commit d5077cb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/relayer/indexer/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func parseIgnoredMsgHashes(value string) (map[common.Hash]struct{}, error) {
154154

155155
hashes := make(map[common.Hash]struct{})
156156

157-
for _, raw := range strings.Split(value, ",") {
157+
for raw := range strings.SplitSeq(value, ",") {
158158
msgHash := strings.TrimSpace(raw)
159159
if msgHash == "" {
160160
continue

packages/taiko-client/pkg/config/chain_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func NewChainConfig(chainID *big.Int, _ uint64) *ChainConfig {
3333

3434
log.Info("")
3535
log.Info(strings.Repeat("-", 153))
36-
for _, line := range strings.Split(cfg.Description(), "\n") {
36+
for line := range strings.SplitSeq(cfg.Description(), "\n") {
3737
log.Info(line)
3838
}
3939
log.Info(strings.Repeat("-", 153))

0 commit comments

Comments
 (0)