mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: support multi-org group sync with runtime configuration (#14578)
- Implement multi-org group sync - Implement runtime configuration to change sync behavior - Legacy group sync migrated to new package
This commit is contained in:
@@ -2,6 +2,7 @@ package runtimeconfig
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"golang.org/x/xerrors"
|
||||
@@ -93,3 +94,11 @@ func (e *RuntimeEntry[T]) name() (string, error) {
|
||||
|
||||
return e.n, nil
|
||||
}
|
||||
|
||||
func JSONString(v any) string {
|
||||
s, err := json.Marshal(v)
|
||||
if err != nil {
|
||||
return "decode failed: " + err.Error()
|
||||
}
|
||||
return string(s)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user