Skip to content

Commit

Permalink
autofix in Context.go
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Sep 30, 2024
1 parent 750a462 commit 9debdd0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Context.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (c *context) invalidAllState() {
}

// cleanState removes all states that were not marked as valid during rendering.
// should be called after rendering
// should be called after rendering.
func (c *context) cleanState() {
c.state.Range(func(k, v any) bool {
if s, ok := v.(*state); ok {
Expand All @@ -138,7 +138,7 @@ func (c *context) Backend() backend.Backend[glfwbackend.GLFWWindowFlags] {
return c.backend
}

// SetState is a generic version of Context.SetState
// SetState is a generic version of Context.SetState.
func SetState[T any, PT genericDisposable[T]](c *context, id string, data PT) {
c.state.Store(id, &state{valid: true, data: data})
}
Expand All @@ -148,7 +148,7 @@ func (c *context) SetState(id string, data Disposable) {
c.state.Store(id, &state{valid: true, data: data})
}

// Get state is a generic version of Context.GetState
// Get state is a generic version of Context.GetState.

Check failure on line 151 in Context.go

View workflow job for this annotation

GitHub Actions / Lint

ST1020: comment on exported function GetState should be of the form "GetState ..." (stylecheck)
func GetState[T any, PT genericDisposable[T]](c *context, id string) PT {
if s, ok := c.load(id); ok {
c.m.Lock()
Expand Down

0 comments on commit 9debdd0

Please sign in to comment.