mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
chore: append template metadata to protobuf config (#20558)
Adds some extra meta data sent to provisioners. Also adds a field `reuse_terraform_workspace` to tell the provisioner whether or not to use the caching experiment.
This commit is contained in:
@@ -10,6 +10,15 @@ import (
|
||||
"github.com/microcosm-cc/bluemonday"
|
||||
)
|
||||
|
||||
// EmptyToNil returns a `nil` for an empty string, or a pointer to the string
|
||||
// otherwise. Useful when needing to treat zero values as nil in APIs.
|
||||
func EmptyToNil(s string) *string {
|
||||
if s == "" {
|
||||
return nil
|
||||
}
|
||||
return &s
|
||||
}
|
||||
|
||||
// JoinWithConjunction joins a slice of strings with commas except for the last
|
||||
// two which are joined with "and".
|
||||
func JoinWithConjunction(s []string) string {
|
||||
|
||||
Reference in New Issue
Block a user