diff options
| author | Taras Madan <tarasmadan@google.com> | 2025-01-22 16:07:17 +0100 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2025-01-23 10:42:36 +0000 |
| commit | 7b4377ad9d8a7205416df8d6217ef2b010f89481 (patch) | |
| tree | e6fec4fd12ff807a16d847923f501075bf71d16c /vendor/github.com/google/safehtml/init.go | |
| parent | 475a4c203afb8b7d3af51c4fd32bb170ff32a45e (diff) | |
vendor: delete
Diffstat (limited to 'vendor/github.com/google/safehtml/init.go')
| -rw-r--r-- | vendor/github.com/google/safehtml/init.go | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/vendor/github.com/google/safehtml/init.go b/vendor/github.com/google/safehtml/init.go deleted file mode 100644 index d37547d72..000000000 --- a/vendor/github.com/google/safehtml/init.go +++ /dev/null @@ -1,58 +0,0 @@ -// 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 safehtml - -import ( - "github.com/google/safehtml/internal/raw" -) - -// stringConstant is an unexported string type. Users of this package cannot -// create values of this type except by passing an untyped string constant to -// functions which expect a stringConstant. This type should only be used in -// function and method parameters. -type stringConstant string - -// The following functions are used by package uncheckedconversions -// (via package raw) to create safe HTML types from plain strings. - -func htmlRaw(s string) HTML { - return HTML{s} -} - -func scriptRaw(s string) Script { - return Script{s} -} - -func style(s string) Style { - return Style{s} -} - -func styleSheetRaw(s string) StyleSheet { - return StyleSheet{s} -} - -func urlRaw(s string) URL { - return URL{s} -} - -func trustedResourceURLRaw(s string) TrustedResourceURL { - return TrustedResourceURL{s} -} - -func identifierRaw(s string) Identifier { - return Identifier{s} -} - -func init() { - raw.HTML = htmlRaw - raw.Script = scriptRaw - raw.Style = style - raw.StyleSheet = styleSheetRaw - raw.URL = urlRaw - raw.TrustedResourceURL = trustedResourceURLRaw - raw.Identifier = identifierRaw -} |
