-
-
Notifications
You must be signed in to change notification settings - Fork 197
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Describe the bug
Using the Marshal function on a interface{} converts an integer to a float value despite the gopkg yamlv3 (gopkg.in/yaml.v3) does not:
Port somehow turns into a float:
- docker:
file: Dockerfile
platform:
- arch: amd64
os: linux
- arch: arm64
os: linux
ingresses:
- host: www
name: website
ports:
- 8080.0
resources: {}
user: "101"
To Reproduce
yamlv3Bytes, err := yamlv3.Marshal(someInterface)
if err != nil {
return err
}
fmt.Println(string(yamlv3Bytes))
yamlBytes, err := yaml.Marshal(someInterface)
if err != nil {
return err
}
fmt.Println(string(yamlBytes))
Expected behavior
Port should remain an int like so:
- docker:
file: Dockerfile
platform:
- arch: amd64
os: linux
- arch: arm64
os: linux
ingresses:
- host: www
name: website
ports:
- 8080
resources: {}
user: "101"
Version Variables
- Go version: 1.22
- go-yaml's Version: v1.11.3
Additional context
If theres a mistake / missunderstanding on my side please let me know
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested