github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/internal/obscuretestdata/obscuretestdata.go (about) 1 // Copyright 2019 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Package obscuretestdata contains functionality used by tests to more easily 6 // work with testdata that must be obscured primarily due to 7 // golang.org/issue/34986. 8 package obscuretestdata 9 10 // Rot13 returns the rot13 encoding or decoding of its input. 11 func Rot13(data []byte) []byte 12 13 // DecodeToTempFile decodes the named file to a temporary location. 14 // If successful, it returns the path of the decoded file. 15 // The caller is responsible for ensuring that the temporary file is removed. 16 func DecodeToTempFile(name string) (path string, err error) 17 18 // ReadFile reads the named file and returns its decoded contents. 19 func ReadFile(name string) ([]byte, error)