diff --git a/go/examples/call-graphql.go b/go/examples/call-graphql.go deleted file mode 100644 index 9ef6af54f..000000000 --- a/go/examples/call-graphql.go +++ /dev/null @@ -1,88 +0,0 @@ -package main - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io/ioutil" - "net/http" - "os" -) - -func jsonPrettyPrint(in []byte) string { - var out bytes.Buffer - err := json.Indent(&out, in, "", " ") - if err != nil { - return string(in) - } - return out.String() -} - -var HASURA_GRAPHQL_ADDRESS = os.Getenv("HASURA_GRAPHQL_ADDRESS") -var HASURA_GRAPHQL_ADMIN_SECRET = os.Getenv("HASURA_GRAPHQL_ADMIN_SECRET") - -type GraphqlQuery struct { - Data interface{} -} - -var client = &http.Client{Transport: http.DefaultTransport} - -func hasura(query string, variables interface{}, data interface{}) (err error) { - variablesBytes, err := json.Marshal(variables) - if err != nil { - return - } - - v := string(variablesBytes) - requestBody := []byte(`{"query":"` + query + `","variables":` + v + `}`) - requestBytes := bytes.NewBuffer(requestBody) - req, err := http.NewRequest("POST", HASURA_GRAPHQL_ADDRESS, requestBytes) - if err != nil { - return - } - - req.Header.Add("X-Hasura-Admin-Secret", HASURA_GRAPHQL_ADMIN_SECRET) - - resp, err := client.Do(req) - if err != nil { - return - } - - b, err := ioutil.ReadAll(resp.Body) - if err != nil { - return - } - - // loggin the answer for debugging purposes - fmt.Println(jsonPrettyPrint(b)) - - if resp.StatusCode < 200 || resp.StatusCode > 299 { - return errors.New(http.StatusText(resp.StatusCode)) - } - - return json.Unmarshal(b, &GraphqlQuery{Data: data}) -} - -type User struct { - GithubLogin string -} - -const userQuery = ` -query { - user { - githubLogin - } -}` - -func getUsers() (users []User, err error) { - var data map[string][]User - err = hasura(userQuery, nil, &data) - return data["user"], err -} - -func main() { - fmt.Println(getUsers()) -} - -// HASURA_GRAPHQL_ADMIN_SECRET=VERYVERYSECRET HASURA_GRAPHQL_ADDRESS=http://localhost/graphql-engine/v1alpha1/graphql go run call-graphql.go diff --git a/go/tests/Dockerfile b/go/tests/Dockerfile index 9c03b5fbb..7da90504c 100644 --- a/go/tests/Dockerfile +++ b/go/tests/Dockerfile @@ -5,17 +5,18 @@ RUN apk add --no-cache git RUN go get golang.org/x/tools/cmd/goimports -RUN mkdir -p /piscine-go -RUN touch /piscine-go/go.mod +WORKDIR /piscine-go +RUN go mod init piscine-go +RUN go get github.com/01-edu/z01@v0.1.0 WORKDIR /public/go/tests COPY go.* ./ RUN go mod download -COPY func func COPY lib lib COPY prog prog RUN go get github.com/01-edu/rc -RUN go install ./prog/... +RUN go install $(grep -rl ChallengeMain ./prog | rev | cut -d/ -f2- | rev) + RUN rm -rf /piscine-go COPY entrypoint.sh /usr/local/bin diff --git a/go/tests/entrypoint.sh b/go/tests/entrypoint.sh index e6dcfa500..fe15832ed 100755 --- a/go/tests/entrypoint.sh +++ b/go/tests/entrypoint.sh @@ -52,5 +52,5 @@ if command -v "${EXERCISE}_test" >/dev/null 2>&1; then "${EXERCISE}_test" else # The exercise is a function - go run "./func/${EXERCISE}_test" + go run "./prog/${EXERCISE}_test" fi diff --git a/go/tests/func/abort_test/main.go b/go/tests/prog/abort_test/main.go similarity index 100% rename from go/tests/func/abort_test/main.go rename to go/tests/prog/abort_test/main.go diff --git a/go/tests/func/activebits_test/main.go b/go/tests/prog/activebits_test/main.go similarity index 100% rename from go/tests/func/activebits_test/main.go rename to go/tests/prog/activebits_test/main.go diff --git a/go/tests/func/advancedsortwordarr_test/main.go b/go/tests/prog/advancedsortwordarr_test/main.go similarity index 100% rename from go/tests/func/advancedsortwordarr_test/main.go rename to go/tests/prog/advancedsortwordarr_test/main.go diff --git a/go/tests/func/alphacount_test/main.go b/go/tests/prog/alphacount_test/main.go similarity index 100% rename from go/tests/func/alphacount_test/main.go rename to go/tests/prog/alphacount_test/main.go diff --git a/go/tests/func/any_test/main.go b/go/tests/prog/any_test/main.go similarity index 100% rename from go/tests/func/any_test/main.go rename to go/tests/prog/any_test/main.go diff --git a/go/tests/func/appendrange_test/main.go b/go/tests/prog/appendrange_test/main.go similarity index 100% rename from go/tests/func/appendrange_test/main.go rename to go/tests/prog/appendrange_test/main.go diff --git a/go/tests/func/atoi_test/main.go b/go/tests/prog/atoi_test/main.go similarity index 100% rename from go/tests/func/atoi_test/main.go rename to go/tests/prog/atoi_test/main.go diff --git a/go/tests/func/atoibase_test/main.go b/go/tests/prog/atoibase_test/main.go similarity index 100% rename from go/tests/func/atoibase_test/main.go rename to go/tests/prog/atoibase_test/main.go diff --git a/go/tests/func/basicatoi2_test/main.go b/go/tests/prog/basicatoi2_test/main.go similarity index 100% rename from go/tests/func/basicatoi2_test/main.go rename to go/tests/prog/basicatoi2_test/main.go diff --git a/go/tests/func/basicatoi_test/main.go b/go/tests/prog/basicatoi_test/main.go similarity index 100% rename from go/tests/func/basicatoi_test/main.go rename to go/tests/prog/basicatoi_test/main.go diff --git a/go/tests/func/basicjoin_test/main.go b/go/tests/prog/basicjoin_test/main.go similarity index 100% rename from go/tests/func/basicjoin_test/main.go rename to go/tests/prog/basicjoin_test/main.go diff --git a/go/tests/func/btreeapplybylevel_test/main.go b/go/tests/prog/btreeapplybylevel_test/main.go similarity index 100% rename from go/tests/func/btreeapplybylevel_test/main.go rename to go/tests/prog/btreeapplybylevel_test/main.go diff --git a/go/tests/func/btreeapplyinorder_test/main.go b/go/tests/prog/btreeapplyinorder_test/main.go similarity index 100% rename from go/tests/func/btreeapplyinorder_test/main.go rename to go/tests/prog/btreeapplyinorder_test/main.go diff --git a/go/tests/func/btreeapplypostorder_test/main.go b/go/tests/prog/btreeapplypostorder_test/main.go similarity index 100% rename from go/tests/func/btreeapplypostorder_test/main.go rename to go/tests/prog/btreeapplypostorder_test/main.go diff --git a/go/tests/func/btreeapplypreorder_test/main.go b/go/tests/prog/btreeapplypreorder_test/main.go similarity index 100% rename from go/tests/func/btreeapplypreorder_test/main.go rename to go/tests/prog/btreeapplypreorder_test/main.go diff --git a/go/tests/func/btreedeletenode_test/main.go b/go/tests/prog/btreedeletenode_test/main.go similarity index 100% rename from go/tests/func/btreedeletenode_test/main.go rename to go/tests/prog/btreedeletenode_test/main.go diff --git a/go/tests/func/btreeinsertdata_test/main.go b/go/tests/prog/btreeinsertdata_test/main.go similarity index 100% rename from go/tests/func/btreeinsertdata_test/main.go rename to go/tests/prog/btreeinsertdata_test/main.go diff --git a/go/tests/func/btreeisbinary_test/main.go b/go/tests/prog/btreeisbinary_test/main.go similarity index 100% rename from go/tests/func/btreeisbinary_test/main.go rename to go/tests/prog/btreeisbinary_test/main.go diff --git a/go/tests/func/btreelevelcount_test/main.go b/go/tests/prog/btreelevelcount_test/main.go similarity index 100% rename from go/tests/func/btreelevelcount_test/main.go rename to go/tests/prog/btreelevelcount_test/main.go diff --git a/go/tests/func/btreemax_test/main.go b/go/tests/prog/btreemax_test/main.go similarity index 100% rename from go/tests/func/btreemax_test/main.go rename to go/tests/prog/btreemax_test/main.go diff --git a/go/tests/func/btreemin_test/main.go b/go/tests/prog/btreemin_test/main.go similarity index 100% rename from go/tests/func/btreemin_test/main.go rename to go/tests/prog/btreemin_test/main.go diff --git a/go/tests/func/btreesearchitem_test/main.go b/go/tests/prog/btreesearchitem_test/main.go similarity index 100% rename from go/tests/func/btreesearchitem_test/main.go rename to go/tests/prog/btreesearchitem_test/main.go diff --git a/go/tests/func/btreetransplant_test/main.go b/go/tests/prog/btreetransplant_test/main.go similarity index 100% rename from go/tests/func/btreetransplant_test/main.go rename to go/tests/prog/btreetransplant_test/main.go diff --git a/go/tests/func/capitalize_test/main.go b/go/tests/prog/capitalize_test/main.go similarity index 100% rename from go/tests/func/capitalize_test/main.go rename to go/tests/prog/capitalize_test/main.go diff --git a/go/tests/func/chunk_test/main.go b/go/tests/prog/chunk_test/main.go similarity index 100% rename from go/tests/func/chunk_test/main.go rename to go/tests/prog/chunk_test/main.go diff --git a/go/tests/func/collatzcountdown_test/main.go b/go/tests/prog/collatzcountdown_test/main.go similarity index 100% rename from go/tests/func/collatzcountdown_test/main.go rename to go/tests/prog/collatzcountdown_test/main.go diff --git a/go/tests/func/compact_test/main.go b/go/tests/prog/compact_test/main.go similarity index 100% rename from go/tests/func/compact_test/main.go rename to go/tests/prog/compact_test/main.go diff --git a/go/tests/func/compare_test/main.go b/go/tests/prog/compare_test/main.go similarity index 100% rename from go/tests/func/compare_test/main.go rename to go/tests/prog/compare_test/main.go diff --git a/go/tests/func/concat_test/main.go b/go/tests/prog/concat_test/main.go similarity index 100% rename from go/tests/func/concat_test/main.go rename to go/tests/prog/concat_test/main.go diff --git a/go/tests/func/concatparams_test/main.go b/go/tests/prog/concatparams_test/main.go similarity index 100% rename from go/tests/func/concatparams_test/main.go rename to go/tests/prog/concatparams_test/main.go diff --git a/go/tests/func/convertbase_test/main.go b/go/tests/prog/convertbase_test/main.go similarity index 100% rename from go/tests/func/convertbase_test/main.go rename to go/tests/prog/convertbase_test/main.go diff --git a/go/tests/func/correct/btree.go b/go/tests/prog/correct/btree.go similarity index 100% rename from go/tests/func/correct/btree.go rename to go/tests/prog/correct/btree.go diff --git a/go/tests/func/correct/challenge.go b/go/tests/prog/correct/challenge.go similarity index 100% rename from go/tests/func/correct/challenge.go rename to go/tests/prog/correct/challenge.go diff --git a/go/tests/func/correct/listat.go b/go/tests/prog/correct/listat.go similarity index 100% rename from go/tests/func/correct/listat.go rename to go/tests/prog/correct/listat.go diff --git a/go/tests/func/correct/listclear.go b/go/tests/prog/correct/listclear.go similarity index 100% rename from go/tests/func/correct/listclear.go rename to go/tests/prog/correct/listclear.go diff --git a/go/tests/func/correct/listfind.go b/go/tests/prog/correct/listfind.go similarity index 100% rename from go/tests/func/correct/listfind.go rename to go/tests/prog/correct/listfind.go diff --git a/go/tests/func/correct/listforeach.go b/go/tests/prog/correct/listforeach.go similarity index 100% rename from go/tests/func/correct/listforeach.go rename to go/tests/prog/correct/listforeach.go diff --git a/go/tests/func/correct/listforeachif.go b/go/tests/prog/correct/listforeachif.go similarity index 100% rename from go/tests/func/correct/listforeachif.go rename to go/tests/prog/correct/listforeachif.go diff --git a/go/tests/func/correct/listlast.go b/go/tests/prog/correct/listlast.go similarity index 100% rename from go/tests/func/correct/listlast.go rename to go/tests/prog/correct/listlast.go diff --git a/go/tests/func/correct/listmerge.go b/go/tests/prog/correct/listmerge.go similarity index 100% rename from go/tests/func/correct/listmerge.go rename to go/tests/prog/correct/listmerge.go diff --git a/go/tests/func/correct/listpushback.go b/go/tests/prog/correct/listpushback.go similarity index 100% rename from go/tests/func/correct/listpushback.go rename to go/tests/prog/correct/listpushback.go diff --git a/go/tests/func/correct/listpushfront.go b/go/tests/prog/correct/listpushfront.go similarity index 100% rename from go/tests/func/correct/listpushfront.go rename to go/tests/prog/correct/listpushfront.go diff --git a/go/tests/func/correct/listremoveif.go b/go/tests/prog/correct/listremoveif.go similarity index 100% rename from go/tests/func/correct/listremoveif.go rename to go/tests/prog/correct/listremoveif.go diff --git a/go/tests/func/correct/listreverse.go b/go/tests/prog/correct/listreverse.go similarity index 100% rename from go/tests/func/correct/listreverse.go rename to go/tests/prog/correct/listreverse.go diff --git a/go/tests/func/correct/listsize.go b/go/tests/prog/correct/listsize.go similarity index 100% rename from go/tests/func/correct/listsize.go rename to go/tests/prog/correct/listsize.go diff --git a/go/tests/func/correct/listsort.go b/go/tests/prog/correct/listsort.go similarity index 100% rename from go/tests/func/correct/listsort.go rename to go/tests/prog/correct/listsort.go diff --git a/go/tests/func/correct/sortedlistmerge.go b/go/tests/prog/correct/sortedlistmerge.go similarity index 100% rename from go/tests/func/correct/sortedlistmerge.go rename to go/tests/prog/correct/sortedlistmerge.go diff --git a/go/tests/func/correct/sortlistinsert.go b/go/tests/prog/correct/sortlistinsert.go similarity index 100% rename from go/tests/func/correct/sortlistinsert.go rename to go/tests/prog/correct/sortlistinsert.go diff --git a/go/tests/func/countif_test/main.go b/go/tests/prog/countif_test/main.go similarity index 100% rename from go/tests/func/countif_test/main.go rename to go/tests/prog/countif_test/main.go diff --git a/go/tests/func/divmod_test/main.go b/go/tests/prog/divmod_test/main.go similarity index 100% rename from go/tests/func/divmod_test/main.go rename to go/tests/prog/divmod_test/main.go diff --git a/go/tests/func/doppelganger_test/main.go b/go/tests/prog/doppelganger_test/main.go similarity index 100% rename from go/tests/func/doppelganger_test/main.go rename to go/tests/prog/doppelganger_test/main.go diff --git a/go/tests/func/eightqueens_test/main.go b/go/tests/prog/eightqueens_test/main.go similarity index 100% rename from go/tests/func/eightqueens_test/main.go rename to go/tests/prog/eightqueens_test/main.go diff --git a/go/tests/func/enigma_test/main.go b/go/tests/prog/enigma_test/main.go similarity index 100% rename from go/tests/func/enigma_test/main.go rename to go/tests/prog/enigma_test/main.go diff --git a/go/tests/func/fib_test/main.go b/go/tests/prog/fib_test/main.go similarity index 100% rename from go/tests/func/fib_test/main.go rename to go/tests/prog/fib_test/main.go diff --git a/go/tests/func/fibonacci_test/main.go b/go/tests/prog/fibonacci_test/main.go similarity index 100% rename from go/tests/func/fibonacci_test/main.go rename to go/tests/prog/fibonacci_test/main.go diff --git a/go/tests/func/findnextprime_test/main.go b/go/tests/prog/findnextprime_test/main.go similarity index 100% rename from go/tests/func/findnextprime_test/main.go rename to go/tests/prog/findnextprime_test/main.go diff --git a/go/tests/func/findprevprime_test/main.go b/go/tests/prog/findprevprime_test/main.go similarity index 100% rename from go/tests/func/findprevprime_test/main.go rename to go/tests/prog/findprevprime_test/main.go diff --git a/go/tests/func/firstrune_test/main.go b/go/tests/prog/firstrune_test/main.go similarity index 100% rename from go/tests/func/firstrune_test/main.go rename to go/tests/prog/firstrune_test/main.go diff --git a/go/tests/func/foldint_test/main.go b/go/tests/prog/foldint_test/main.go similarity index 100% rename from go/tests/func/foldint_test/main.go rename to go/tests/prog/foldint_test/main.go diff --git a/go/tests/func/foreach_test/main.go b/go/tests/prog/foreach_test/main.go similarity index 100% rename from go/tests/func/foreach_test/main.go rename to go/tests/prog/foreach_test/main.go diff --git a/go/tests/func/game23_test/main.go b/go/tests/prog/game23_test/main.go similarity index 100% rename from go/tests/func/game23_test/main.go rename to go/tests/prog/game23_test/main.go diff --git a/go/tests/func/halfcontest_test/main.go b/go/tests/prog/halfcontest_test/main.go similarity index 100% rename from go/tests/func/halfcontest_test/main.go rename to go/tests/prog/halfcontest_test/main.go diff --git a/go/tests/func/index_test/main.go b/go/tests/prog/index_test/main.go similarity index 100% rename from go/tests/func/index_test/main.go rename to go/tests/prog/index_test/main.go diff --git a/go/tests/func/interestingnumber_test/main.go b/go/tests/prog/interestingnumber_test/main.go similarity index 100% rename from go/tests/func/interestingnumber_test/main.go rename to go/tests/prog/interestingnumber_test/main.go diff --git a/go/tests/func/isalpha_test/main.go b/go/tests/prog/isalpha_test/main.go similarity index 100% rename from go/tests/func/isalpha_test/main.go rename to go/tests/prog/isalpha_test/main.go diff --git a/go/tests/func/isanagram_test/main.go b/go/tests/prog/isanagram_test/main.go similarity index 100% rename from go/tests/func/isanagram_test/main.go rename to go/tests/prog/isanagram_test/main.go diff --git a/go/tests/func/islower_test/main.go b/go/tests/prog/islower_test/main.go similarity index 100% rename from go/tests/func/islower_test/main.go rename to go/tests/prog/islower_test/main.go diff --git a/go/tests/func/isnegative_test/main.go b/go/tests/prog/isnegative_test/main.go similarity index 100% rename from go/tests/func/isnegative_test/main.go rename to go/tests/prog/isnegative_test/main.go diff --git a/go/tests/func/isnumeric_test/main.go b/go/tests/prog/isnumeric_test/main.go similarity index 100% rename from go/tests/func/isnumeric_test/main.go rename to go/tests/prog/isnumeric_test/main.go diff --git a/go/tests/func/isprime_test/main.go b/go/tests/prog/isprime_test/main.go similarity index 100% rename from go/tests/func/isprime_test/main.go rename to go/tests/prog/isprime_test/main.go diff --git a/go/tests/func/isprintable_test/main.go b/go/tests/prog/isprintable_test/main.go similarity index 100% rename from go/tests/func/isprintable_test/main.go rename to go/tests/prog/isprintable_test/main.go diff --git a/go/tests/func/issorted_test/main.go b/go/tests/prog/issorted_test/main.go similarity index 100% rename from go/tests/func/issorted_test/main.go rename to go/tests/prog/issorted_test/main.go diff --git a/go/tests/func/isupper_test/main.go b/go/tests/prog/isupper_test/main.go similarity index 100% rename from go/tests/func/isupper_test/main.go rename to go/tests/prog/isupper_test/main.go diff --git a/go/tests/func/iterativefactorial_test/main.go b/go/tests/prog/iterativefactorial_test/main.go similarity index 100% rename from go/tests/func/iterativefactorial_test/main.go rename to go/tests/prog/iterativefactorial_test/main.go diff --git a/go/tests/func/iterativepower_test/main.go b/go/tests/prog/iterativepower_test/main.go similarity index 100% rename from go/tests/func/iterativepower_test/main.go rename to go/tests/prog/iterativepower_test/main.go diff --git a/go/tests/func/itoa_test/main.go b/go/tests/prog/itoa_test/main.go similarity index 100% rename from go/tests/func/itoa_test/main.go rename to go/tests/prog/itoa_test/main.go diff --git a/go/tests/func/itoabase_test/main.go b/go/tests/prog/itoabase_test/main.go similarity index 100% rename from go/tests/func/itoabase_test/main.go rename to go/tests/prog/itoabase_test/main.go diff --git a/go/tests/func/join_test/main.go b/go/tests/prog/join_test/main.go similarity index 100% rename from go/tests/func/join_test/main.go rename to go/tests/prog/join_test/main.go diff --git a/go/tests/func/lastrune_test/main.go b/go/tests/prog/lastrune_test/main.go similarity index 100% rename from go/tests/func/lastrune_test/main.go rename to go/tests/prog/lastrune_test/main.go diff --git a/go/tests/func/lcm_test/main.go b/go/tests/prog/lcm_test/main.go similarity index 100% rename from go/tests/func/lcm_test/main.go rename to go/tests/prog/lcm_test/main.go diff --git a/go/tests/func/listat_test/main.go b/go/tests/prog/listat_test/main.go similarity index 100% rename from go/tests/func/listat_test/main.go rename to go/tests/prog/listat_test/main.go diff --git a/go/tests/func/listclear_test/main.go b/go/tests/prog/listclear_test/main.go similarity index 100% rename from go/tests/func/listclear_test/main.go rename to go/tests/prog/listclear_test/main.go diff --git a/go/tests/func/listfind_test/main.go b/go/tests/prog/listfind_test/main.go similarity index 100% rename from go/tests/func/listfind_test/main.go rename to go/tests/prog/listfind_test/main.go diff --git a/go/tests/func/listforeach_test/main.go b/go/tests/prog/listforeach_test/main.go similarity index 100% rename from go/tests/func/listforeach_test/main.go rename to go/tests/prog/listforeach_test/main.go diff --git a/go/tests/func/listforeachif_test/main.go b/go/tests/prog/listforeachif_test/main.go similarity index 100% rename from go/tests/func/listforeachif_test/main.go rename to go/tests/prog/listforeachif_test/main.go diff --git a/go/tests/func/listlast_test/main.go b/go/tests/prog/listlast_test/main.go similarity index 100% rename from go/tests/func/listlast_test/main.go rename to go/tests/prog/listlast_test/main.go diff --git a/go/tests/func/listmerge_test/main.go b/go/tests/prog/listmerge_test/main.go similarity index 100% rename from go/tests/func/listmerge_test/main.go rename to go/tests/prog/listmerge_test/main.go diff --git a/go/tests/func/listpushback_test/main.go b/go/tests/prog/listpushback_test/main.go similarity index 100% rename from go/tests/func/listpushback_test/main.go rename to go/tests/prog/listpushback_test/main.go diff --git a/go/tests/func/listpushfront_test/main.go b/go/tests/prog/listpushfront_test/main.go similarity index 100% rename from go/tests/func/listpushfront_test/main.go rename to go/tests/prog/listpushfront_test/main.go diff --git a/go/tests/func/listremoveif_test/main.go b/go/tests/prog/listremoveif_test/main.go similarity index 100% rename from go/tests/func/listremoveif_test/main.go rename to go/tests/prog/listremoveif_test/main.go diff --git a/go/tests/func/listreverse_test/main.go b/go/tests/prog/listreverse_test/main.go similarity index 100% rename from go/tests/func/listreverse_test/main.go rename to go/tests/prog/listreverse_test/main.go diff --git a/go/tests/func/listsize_test/main.go b/go/tests/prog/listsize_test/main.go similarity index 100% rename from go/tests/func/listsize_test/main.go rename to go/tests/prog/listsize_test/main.go diff --git a/go/tests/func/listsort_test/main.go b/go/tests/prog/listsort_test/main.go similarity index 100% rename from go/tests/func/listsort_test/main.go rename to go/tests/prog/listsort_test/main.go diff --git a/go/tests/func/makerange_test/main.go b/go/tests/prog/makerange_test/main.go similarity index 100% rename from go/tests/func/makerange_test/main.go rename to go/tests/prog/makerange_test/main.go diff --git a/go/tests/func/map_test/main.go b/go/tests/prog/map_test/main.go similarity index 100% rename from go/tests/func/map_test/main.go rename to go/tests/prog/map_test/main.go diff --git a/go/tests/func/max_test/main.go b/go/tests/prog/max_test/main.go similarity index 100% rename from go/tests/func/max_test/main.go rename to go/tests/prog/max_test/main.go diff --git a/go/tests/func/nauuo_test/main.go b/go/tests/prog/nauuo_test/main.go similarity index 100% rename from go/tests/func/nauuo_test/main.go rename to go/tests/prog/nauuo_test/main.go diff --git a/go/tests/func/nrune_test/main.go b/go/tests/prog/nrune_test/main.go similarity index 100% rename from go/tests/func/nrune_test/main.go rename to go/tests/prog/nrune_test/main.go diff --git a/go/tests/func/pointone_test/main.go b/go/tests/prog/pointone_test/main.go similarity index 100% rename from go/tests/func/pointone_test/main.go rename to go/tests/prog/pointone_test/main.go diff --git a/go/tests/func/printcomb2_test/main.go b/go/tests/prog/printcomb2_test/main.go similarity index 100% rename from go/tests/func/printcomb2_test/main.go rename to go/tests/prog/printcomb2_test/main.go diff --git a/go/tests/func/printcomb_test/main.go b/go/tests/prog/printcomb_test/main.go similarity index 100% rename from go/tests/func/printcomb_test/main.go rename to go/tests/prog/printcomb_test/main.go diff --git a/go/tests/func/printcombn_test/main.go b/go/tests/prog/printcombn_test/main.go similarity index 100% rename from go/tests/func/printcombn_test/main.go rename to go/tests/prog/printcombn_test/main.go diff --git a/go/tests/func/printmemory_test/main.go b/go/tests/prog/printmemory_test/main.go similarity index 100% rename from go/tests/func/printmemory_test/main.go rename to go/tests/prog/printmemory_test/main.go diff --git a/go/tests/func/printnbr_test/main.go b/go/tests/prog/printnbr_test/main.go similarity index 100% rename from go/tests/func/printnbr_test/main.go rename to go/tests/prog/printnbr_test/main.go diff --git a/go/tests/func/printnbrbase_test/main.go b/go/tests/prog/printnbrbase_test/main.go similarity index 100% rename from go/tests/func/printnbrbase_test/main.go rename to go/tests/prog/printnbrbase_test/main.go diff --git a/go/tests/func/printnbrinorder_test/main.go b/go/tests/prog/printnbrinorder_test/main.go similarity index 100% rename from go/tests/func/printnbrinorder_test/main.go rename to go/tests/prog/printnbrinorder_test/main.go diff --git a/go/tests/func/printstr_test/main.go b/go/tests/prog/printstr_test/main.go similarity index 100% rename from go/tests/func/printstr_test/main.go rename to go/tests/prog/printstr_test/main.go diff --git a/go/tests/func/printwordstables_test/main.go b/go/tests/prog/printwordstables_test/main.go similarity index 100% rename from go/tests/func/printwordstables_test/main.go rename to go/tests/prog/printwordstables_test/main.go diff --git a/go/tests/func/priorprime_test/main.go b/go/tests/prog/priorprime_test/main.go similarity index 100% rename from go/tests/func/priorprime_test/main.go rename to go/tests/prog/priorprime_test/main.go diff --git a/go/tests/func/quada_test/main.go b/go/tests/prog/quada_test/main.go similarity index 100% rename from go/tests/func/quada_test/main.go rename to go/tests/prog/quada_test/main.go diff --git a/go/tests/func/quadb_test/main.go b/go/tests/prog/quadb_test/main.go similarity index 100% rename from go/tests/func/quadb_test/main.go rename to go/tests/prog/quadb_test/main.go diff --git a/go/tests/func/quadc_test/main.go b/go/tests/prog/quadc_test/main.go similarity index 100% rename from go/tests/func/quadc_test/main.go rename to go/tests/prog/quadc_test/main.go diff --git a/go/tests/func/quadd_test/main.go b/go/tests/prog/quadd_test/main.go similarity index 100% rename from go/tests/func/quadd_test/main.go rename to go/tests/prog/quadd_test/main.go diff --git a/go/tests/func/quade_test/main.go b/go/tests/prog/quade_test/main.go similarity index 100% rename from go/tests/func/quade_test/main.go rename to go/tests/prog/quade_test/main.go diff --git a/go/tests/func/reachablenumber_test/main.go b/go/tests/prog/reachablenumber_test/main.go similarity index 100% rename from go/tests/func/reachablenumber_test/main.go rename to go/tests/prog/reachablenumber_test/main.go diff --git a/go/tests/func/recursivefactorial_test/main.go b/go/tests/prog/recursivefactorial_test/main.go similarity index 100% rename from go/tests/func/recursivefactorial_test/main.go rename to go/tests/prog/recursivefactorial_test/main.go diff --git a/go/tests/func/recursivepower_test/main.go b/go/tests/prog/recursivepower_test/main.go similarity index 100% rename from go/tests/func/recursivepower_test/main.go rename to go/tests/prog/recursivepower_test/main.go diff --git a/go/tests/func/reduceint_test/main.go b/go/tests/prog/reduceint_test/main.go similarity index 100% rename from go/tests/func/reduceint_test/main.go rename to go/tests/prog/reduceint_test/main.go diff --git a/go/tests/func/reversebits_test/main.go b/go/tests/prog/reversebits_test/main.go similarity index 100% rename from go/tests/func/reversebits_test/main.go rename to go/tests/prog/reversebits_test/main.go diff --git a/go/tests/func/revivethreenums_test/main.go b/go/tests/prog/revivethreenums_test/main.go similarity index 100% rename from go/tests/func/revivethreenums_test/main.go rename to go/tests/prog/revivethreenums_test/main.go diff --git a/go/tests/func/rot14_test/main.go b/go/tests/prog/rot14_test/main.go similarity index 100% rename from go/tests/func/rot14_test/main.go rename to go/tests/prog/rot14_test/main.go diff --git a/go/tests/func/slice_test/main.go b/go/tests/prog/slice_test/main.go similarity index 100% rename from go/tests/func/slice_test/main.go rename to go/tests/prog/slice_test/main.go diff --git a/go/tests/func/sortedlistmerge_test/main.go b/go/tests/prog/sortedlistmerge_test/main.go similarity index 100% rename from go/tests/func/sortedlistmerge_test/main.go rename to go/tests/prog/sortedlistmerge_test/main.go diff --git a/go/tests/func/sortintegertable_test/main.go b/go/tests/prog/sortintegertable_test/main.go similarity index 100% rename from go/tests/func/sortintegertable_test/main.go rename to go/tests/prog/sortintegertable_test/main.go diff --git a/go/tests/func/sortlistinsert_test/main.go b/go/tests/prog/sortlistinsert_test/main.go similarity index 100% rename from go/tests/func/sortlistinsert_test/main.go rename to go/tests/prog/sortlistinsert_test/main.go diff --git a/go/tests/func/sortwordarr_test/main.go b/go/tests/prog/sortwordarr_test/main.go similarity index 100% rename from go/tests/func/sortwordarr_test/main.go rename to go/tests/prog/sortwordarr_test/main.go diff --git a/go/tests/func/split_test/main.go b/go/tests/prog/split_test/main.go similarity index 100% rename from go/tests/func/split_test/main.go rename to go/tests/prog/split_test/main.go diff --git a/go/tests/func/splitwhitespaces_test/main.go b/go/tests/prog/splitwhitespaces_test/main.go similarity index 100% rename from go/tests/func/splitwhitespaces_test/main.go rename to go/tests/prog/splitwhitespaces_test/main.go diff --git a/go/tests/func/sqrt_test/main.go b/go/tests/prog/sqrt_test/main.go similarity index 100% rename from go/tests/func/sqrt_test/main.go rename to go/tests/prog/sqrt_test/main.go diff --git a/go/tests/func/strlen_test/main.go b/go/tests/prog/strlen_test/main.go similarity index 100% rename from go/tests/func/strlen_test/main.go rename to go/tests/prog/strlen_test/main.go diff --git a/go/tests/func/strrev_test/main.go b/go/tests/prog/strrev_test/main.go similarity index 100% rename from go/tests/func/strrev_test/main.go rename to go/tests/prog/strrev_test/main.go diff --git a/go/tests/func/swap_test/main.go b/go/tests/prog/swap_test/main.go similarity index 100% rename from go/tests/func/swap_test/main.go rename to go/tests/prog/swap_test/main.go diff --git a/go/tests/func/swapbits_test/main.go b/go/tests/prog/swapbits_test/main.go similarity index 100% rename from go/tests/func/swapbits_test/main.go rename to go/tests/prog/swapbits_test/main.go diff --git a/go/tests/func/sweetproblem_test/main.go b/go/tests/prog/sweetproblem_test/main.go similarity index 100% rename from go/tests/func/sweetproblem_test/main.go rename to go/tests/prog/sweetproblem_test/main.go diff --git a/go/tests/func/tolower_test/main.go b/go/tests/prog/tolower_test/main.go similarity index 100% rename from go/tests/func/tolower_test/main.go rename to go/tests/prog/tolower_test/main.go diff --git a/go/tests/func/toupper_test/main.go b/go/tests/prog/toupper_test/main.go similarity index 100% rename from go/tests/func/toupper_test/main.go rename to go/tests/prog/toupper_test/main.go diff --git a/go/tests/func/trimatoi_test/main.go b/go/tests/prog/trimatoi_test/main.go similarity index 100% rename from go/tests/func/trimatoi_test/main.go rename to go/tests/prog/trimatoi_test/main.go diff --git a/go/tests/func/twosum_test/main.go b/go/tests/prog/twosum_test/main.go similarity index 100% rename from go/tests/func/twosum_test/main.go rename to go/tests/prog/twosum_test/main.go diff --git a/go/tests/func/ultimatedivmod_test/main.go b/go/tests/prog/ultimatedivmod_test/main.go similarity index 100% rename from go/tests/func/ultimatedivmod_test/main.go rename to go/tests/prog/ultimatedivmod_test/main.go diff --git a/go/tests/func/ultimatepointone_test/main.go b/go/tests/prog/ultimatepointone_test/main.go similarity index 100% rename from go/tests/func/ultimatepointone_test/main.go rename to go/tests/prog/ultimatepointone_test/main.go diff --git a/go/tests/func/unmatch_test/main.go b/go/tests/prog/unmatch_test/main.go similarity index 100% rename from go/tests/func/unmatch_test/main.go rename to go/tests/prog/unmatch_test/main.go diff --git a/go/tests/func/volumechanger_test/main.go b/go/tests/prog/volumechanger_test/main.go similarity index 100% rename from go/tests/func/volumechanger_test/main.go rename to go/tests/prog/volumechanger_test/main.go