---
ok
package main
import (
"fmt"
"gopkg.in/yaml.v3"
"log"
)
type Scalar struct {
Value string
}
func main() {
// YAML content
yamlContent := `
---
ok
`
var scalar Scalar
err := yaml.Unmarshal([]byte(yamlContent), &scalar.Value)
if err != nil {
log.Fatalf("error: %v", err)
}
fmt.Printf("Parsed YAML:\n%+v\n", scalar.Value)
}