0.1.7x testin

This commit is contained in:
Peder Vatn Austad
2024-05-23 18:52:25 +02:00
parent 69ee20b7aa
commit 41dddd1778
4 changed files with 23 additions and 2 deletions

View File

@@ -130,7 +130,7 @@ type Data struct {
func main() {
// Fetch data from entur
resp, err := http.Get("https://api.entur.io/realtime/v1/rest/et?maxSize=100")
resp, err := http.Get("https://api.entur.io/realtime/v1/rest/et")
if err != nil {
log.Fatal(err)
}
@@ -144,7 +144,9 @@ func main() {
log.Fatal(err)
}
printData(data)
if 1 == 0 {
printData(data)
}
}

3
test/go.mod Normal file
View File

@@ -0,0 +1,3 @@
module myapp
go 1.22.1

9
test/main.go Normal file
View File

@@ -0,0 +1,9 @@
package main
import (
"myapp/mypackage"
)
func main() {
mypackage.PrintHello()
}

7
test/mypackage/test.go Normal file
View File

@@ -0,0 +1,7 @@
package mypackage
import "fmt"
func PrintHello() {
fmt.Println("Hello, World!")
}