Skip to content

v0.2.2

Choose a tag to compare

@ryanhamamura ryanhamamura released this 14 Jan 12:02
· 62 commits to main since this release

Changes

  • Simplified Datastar configuration API: Flattened DatastarConfig struct into Options with direct DatastarContent and DatastarPath fields
  • Improved thread safety: Replaced boolean flag with sync.Once for handler registration

Migration

// Before
v.Config(via.Options{
    Datastar: &via.DatastarConfig{
        Content: customScript,
        Path:    "/assets/datastar.js",
    },
})

// After
v.Config(via.Options{
    DatastarContent: customScript,
    DatastarPath:    "/assets/datastar.js",
})