diff options
| author | Taras Madan <tarasmadan@google.com> | 2023-02-22 22:16:50 +0100 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2023-02-24 12:47:23 +0100 |
| commit | 4165372ec8fd142475a4e35fd0cf4f8042132208 (patch) | |
| tree | 21cd62211b4dd80bee469054c5b65db77342333c /vendor/github.com/google/safehtml/template/init.go | |
| parent | 2b3ed821a493b8936c8bacfa6f8b4f1c90a00855 (diff) | |
dependencies: update
set go min requirements to 1.19
update dependencies
update vendor
Diffstat (limited to 'vendor/github.com/google/safehtml/template/init.go')
| -rw-r--r-- | vendor/github.com/google/safehtml/template/init.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/vendor/github.com/google/safehtml/template/init.go b/vendor/github.com/google/safehtml/template/init.go new file mode 100644 index 000000000..c9fa2de1d --- /dev/null +++ b/vendor/github.com/google/safehtml/template/init.go @@ -0,0 +1,28 @@ +// Copyright (c) 2017 The Go Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file or at +// https://developers.google.com/open-source/licenses/bsd + +package template + +import ( + "github.com/google/safehtml/internal/template/raw" +) + +// The following functions are used by package uncheckedconversions +// (via package raw) to create TrustedSource and TrustedTemplate values +// from plain strings. + +func trustedSourceRaw(s string) TrustedSource { + return TrustedSource{s} +} + +func trustedTemplateRaw(s string) TrustedTemplate { + return TrustedTemplate{s} +} + +func init() { + raw.TrustedSource = trustedSourceRaw + raw.TrustedTemplate = trustedTemplateRaw +} |
