Execute os file before Atoi execution

Signed-off-by: jffarge <slumbering.pierrot@gmail.com>
This commit is contained in:
jffarge 2021-10-22 16:48:30 +02:00 committed by guillaume
parent 0e3ca30189
commit 40f132b77b

View File

@ -2,6 +2,7 @@ package http
import ( import (
"encoding/json" "encoding/json"
"strconv"
"alpha.dagger.io/alpine" "alpha.dagger.io/alpine"
"alpha.dagger.io/dagger" "alpha.dagger.io/dagger"
@ -64,18 +65,23 @@ import (
"""# """#
} }
statusCode: {
os.#File & {
from: ctr
path: "/status"
}
}.contents @dagger(output)
body: {
os.#File & {
from: ctr
path: "/response"
}
}.contents @dagger(output)
// Force os.#File exec before Atoi
response: { response: {
body: { "body": body
os.#File & { "statusCode": strconv.Atoi(statusCode)
from: ctr
path: "/response"
}
}.contents @dagger(output)
statusCode: {
os.#File & {
from: ctr
path: "/status"
}
}.contents @dagger(output)
} }
} }