wip-flag-migration #28
@ -9,7 +9,6 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
|
||||||
|
|
||||||
"git.defalsify.org/vise.git/asm"
|
"git.defalsify.org/vise.git/asm"
|
||||||
"git.defalsify.org/vise.git/engine"
|
"git.defalsify.org/vise.git/engine"
|
||||||
@ -56,7 +55,6 @@ type FSData struct {
|
|||||||
// FlagManager handles centralized flag management
|
// FlagManager handles centralized flag management
|
||||||
type FlagManager struct {
|
type FlagManager struct {
|
||||||
parser *asm.FlagParser
|
parser *asm.FlagParser
|
||||||
mu sync.RWMutex
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Alfred-mk marked this conversation as resolved
|
|||||||
// NewFlagManager creates a new FlagManager instance
|
// NewFlagManager creates a new FlagManager instance
|
||||||
@ -74,9 +72,6 @@ func NewFlagManager(csvPath string) (*FlagManager, error) {
|
|||||||
|
|
||||||
// GetFlag retrieves a flag value by its label
|
// GetFlag retrieves a flag value by its label
|
||||||
func (fm *FlagManager) GetFlag(label string) (uint32, error) {
|
func (fm *FlagManager) GetFlag(label string) (uint32, error) {
|
||||||
fm.mu.RLock()
|
|
||||||
defer fm.mu.RUnlock()
|
|
||||||
|
|
||||||
return fm.parser.GetFlag(label)
|
return fm.parser.GetFlag(label)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user
I don't think mutex is needed here, it will be loaded once (before threads) and only read from then right?