Skip to content

Commit 0483b58

Browse files
authored
chore: use splitseq instead of split (#515)
1 parent 734d1d7 commit 0483b58

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/TibiaCreaturesCreature.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ func TibiaCreaturesCreatureImpl(race string, BoxContentHTML string, url string)
153153
CreatureExperiencePoints = TibiaDataStringToInteger(subma3[0][1])
154154
if subma3[0][2] != "nothing" {
155155
CreatureIsLootable = true
156-
CreatureLootListTmp := strings.Split(strings.Replace(strings.Replace(subma3[0][2], "items ", "", 1), " and sometimes other ", "", 1), ", ")
157-
for _, str := range CreatureLootListTmp {
156+
CreatureLootListTmp := strings.SplitSeq(strings.Replace(strings.Replace(subma3[0][2], "items ", "", 1), " and sometimes other ", "", 1), ", ")
157+
for str := range CreatureLootListTmp {
158158
if str != "" {
159159
CreatureLootList = append(CreatureLootList, str)
160160
}

src/TibiaGuildsGuild.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func TibiaGuildsGuildImpl(guild string, BoxContentHTML string, url string) (Guil
122122
return GuildResponse{}, fmt.Errorf("[error] TibiaGuildsGuildImpl failed at InnerTableContainerTMPB ReaderHTML.Find, err: %s", err)
123123
}
124124

125-
for _, line := range strings.Split(strings.TrimSuffix(InnerTableContainerTMPB, "\n"), "\n") {
125+
for line := range strings.SplitSeq(strings.TrimSuffix(InnerTableContainerTMPB, "\n"), "\n") {
126126
// Guild information
127127
if !GuildDescriptionFinished {
128128
// First line is the description..

src/TibiaWorldsWorld.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ func TibiaWorldsWorldImpl(world string, BoxContentHTML string, url string) (Worl
136136

137137
if WorldsInformationLeftColumn == "World Quest Titles" {
138138
if WorldsInformationRightColumn != "This game world currently has no title." {
139-
WorldsQuestTitlesTmp := strings.Split(WorldsInformationRightColumn, ", ")
140-
for _, str := range WorldsQuestTitlesTmp {
139+
WorldsQuestTitlesTmp := strings.SplitSeq(WorldsInformationRightColumn, ", ")
140+
for str := range WorldsQuestTitlesTmp {
141141
if str != "" {
142142
WorldsQuestTitles = append(WorldsQuestTitles, TibiaDataRemoveURLs(str))
143143
}

0 commit comments

Comments
 (0)