18 lines
426 B
Go
18 lines
426 B
Go
package testing_ex
|
|
|
|
type Store interface {
|
|
Get(key string) (string, bool)
|
|
}
|
|
|
|
type FeatureFlags struct {
|
|
Store Store
|
|
}
|
|
|
|
func (f FeatureFlags) IsEnabled(name string) bool {
|
|
panic("TODO: pobierz z f.Store.Get(name); zwróć true dla 'true' lub '1' (case-insensitive)")
|
|
}
|
|
|
|
func WriteAndReadLines(path string, lines []string) ([]string, error) {
|
|
panic("TODO: zapisz lines (os.WriteFile) i odczytaj z powrotem (os.ReadFile)")
|
|
}
|