0.1.7x testin
This commit is contained in:
6
main.go
6
main.go
@@ -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
3
test/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module myapp
|
||||
|
||||
go 1.22.1
|
||||
9
test/main.go
Normal file
9
test/main.go
Normal file
@@ -0,0 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"myapp/mypackage"
|
||||
)
|
||||
|
||||
func main() {
|
||||
mypackage.PrintHello()
|
||||
}
|
||||
7
test/mypackage/test.go
Normal file
7
test/mypackage/test.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package mypackage
|
||||
|
||||
import "fmt"
|
||||
|
||||
func PrintHello() {
|
||||
fmt.Println("Hello, World!")
|
||||
}
|
||||
Reference in New Issue
Block a user