Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
refl
✓ github.com/swaggest/refl
Access a struct field by path string
package main
import (
"fmt"
"github.com/swaggest/refl"
)
func main() {
type S struct{ A string }
v := S{A: "hello"}
val, _ := refl.ValueByPath(v, "A")
fmt.Println(val.Interface())
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.4.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.