mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: implement runtime configuration package with multi-org support (#14624)
runtime configuration package --------- Signed-off-by: Danny Kopping <danny@coder.com> Co-authored-by: Danny Kopping <danny@coder.com>
This commit is contained in:
11
coderd/runtimeconfig/util.go
Normal file
11
coderd/runtimeconfig/util.go
Normal file
@ -0,0 +1,11 @@
|
||||
package runtimeconfig
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
)
|
||||
|
||||
func create[T any]() T {
|
||||
var zero T
|
||||
//nolint:forcetypeassert
|
||||
return reflect.New(reflect.TypeOf(zero).Elem()).Interface().(T)
|
||||
}
|
Reference in New Issue
Block a user