Skip to content
Snippets Groups Projects
Commit 552ce434 authored by Tóth Miklós Tibor's avatar Tóth Miklós Tibor :shrug:
Browse files

remove randomizing

parent 0a0ad4fa
Branches master
No related tags found
No related merge requests found
Pipeline #8919 passed
image: alpine image: alpine
variables: variables:
VERSION: v2.4 VERSION: v2.5
stages: stages:
- build - build
......
...@@ -4,7 +4,6 @@ import ( ...@@ -4,7 +4,6 @@ import (
"embed" "embed"
"gopkg.in/yaml.v3" "gopkg.in/yaml.v3"
"io/ioutil" "io/ioutil"
"math/rand"
) )
//go:embed storyTemplates/* //go:embed storyTemplates/*
...@@ -43,22 +42,12 @@ func ReadFile() { ...@@ -43,22 +42,12 @@ func ReadFile() {
} }
func CreateNewRoute() []string { func CreateNewRoute() []string {
stationIds := make([]string, len(Stations)-2) stationIds := make([]string, len(Stations))
i := 0 i := 0
for k := range Stations { for k := range Stations {
switch k {
case "first", "last":
default:
stationIds[i] = k stationIds[i] = k
i++ i++
} }
}
rand.Shuffle(len(stationIds), func(i, j int) {
stationIds[i], stationIds[j] = stationIds[j], stationIds[i]
})
stationIds = append([]string{"first"}, stationIds...)
stationIds = append(stationIds, "last")
return stationIds return stationIds
} }
...@@ -2,5 +2,5 @@ replicas: 1 ...@@ -2,5 +2,5 @@ replicas: 1
Domain: keresettaferi.kszk.bme.hu Domain: keresettaferi.kszk.bme.hu
Name: keresettaferi Name: keresettaferi
Tag: "v2.4" Tag: "v2.5"
REGISTRY_CONF: "${REGISTRY_CONF}" REGISTRY_CONF: "${REGISTRY_CONF}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment