func strings.TrimSuffix
66 uses
strings (current package)
strings.go#L911: func TrimSuffix(s, suffix string) string {
crypto/x509
verify.go#L921: host = strings.TrimSuffix(host, ".")
verify.go#L984: host = toLowerCaseASCII(strings.TrimSuffix(host, "."))
github.com/go-git/go-git/v5/plumbing/format/diff
unified_encoder.go#L222: g.current = &hunk{ctxPrefix: strings.TrimSuffix(ctxPrefix, "\n")}
unified_encoder.go#L370: sb.WriteString(strings.TrimSuffix(o.text, "\n"))
github.com/go-git/go-git/v5/plumbing/object
commit.go#L299: signature := strings.TrimSuffix(b.PGPSignature, "\n")
tree.go#L413: w.base = strings.TrimSuffix(w.base, "/")
github.com/golang/protobuf/proto
text_encode.go#L521: name = strings.TrimSuffix(name, ".message_set_extension")
github.com/google/go-cmp/cmp
report_reflect.go#L313: lines := strings.Split(strings.TrimSuffix(s, "\n"), "\n")
report_reflect.go#L316: lines[i] = strings.TrimPrefix(strings.TrimSuffix(lines[i], "\r"), "\r") // trim leading/trailing carriage returns for legacy Windows endline support
report_slices.go#L161: line = strings.TrimPrefix(strings.TrimSuffix(line, "\r"), "\r") // trim leading/trailing carriage returns for legacy Windows endline support
github.com/google/go-cmp/cmp/internal/function
func.go#L79: fullName = strings.TrimSuffix(fullName, "-fm")
func.go#L84: fullName = strings.TrimSuffix(fullName, ")")
func.go#L91: fullName = strings.TrimSuffix(fullName, s)
func.go#L96: fullName = strings.TrimSuffix(fullName, ".")
func.go#L98: return strings.TrimSuffix(name, ".")
github.com/google/licensecheck
scan.go#L224: url = strings.TrimSuffix(url, "/")
scan.go#L225: url = strings.TrimSuffix(url, "/legalcode") // Common for CC licenses.
github.com/google/licensecheck/old
license.go#L393: url = strings.TrimSuffix(url, "/")
license.go#L394: url = strings.TrimSuffix(url, "/legalcode") // Common for CC licenses.
github.com/prometheus/procfs
mountstats.go#L527: Operation: strings.TrimSuffix(ss[0], ":"),
net_sockstat.go#L97: proto := strings.TrimSuffix(fields[0], ":")
go/printer
printer.go#L607: prefix = strings.TrimSuffix(prefix, string(suffix))
golang.org/x/mod/internal/lazyregexp
lazyre.go#L66: var inTest = len(os.Args) > 0 && strings.HasSuffix(strings.TrimSuffix(os.Args[0], ".exe"), ".test")
golang.org/x/mod/modfile
read.go#L488: text = strings.TrimSuffix(text, "\n")
golang.org/x/mod/module
module.go#L548: pathMajor = strings.TrimSuffix(pathMajor, "-unstable")
module.go#L587: pathMajor = strings.TrimSuffix(pathMajor, "-unstable")
golang.org/x/pkgsite/devtools/cmd/create_experiment_config
main.go#L53: p := strings.TrimSuffix(path, "/devtools/cmd/run_beta") + "/experiment.yaml"
golang.org/x/pkgsite/internal/fetch
readme.go#L69: return !excludedReadmeExts[ext] && strings.EqualFold(strings.TrimSuffix(base, ext), expectedFile)
golang.org/x/pkgsite/internal/frontend
details.go#L46: http.Redirect(w, r, strings.TrimSuffix(r.URL.Path, "/"), http.StatusMovedPermanently)
styleguide.go#L136: id := strings.TrimSuffix(filepath.Base(filename), ".md")
symbol.go#L233: parent.Synopsis = strings.TrimSuffix(parent.Synopsis, "{ ... }")
urlinfo.go#L96: fullPath: strings.TrimSuffix(strings.TrimPrefix(parts[0], "/"), "/"),
urlinfo.go#L140: fullPath := strings.TrimSuffix(strings.TrimPrefix(parts[0], "/"), "/")
urlinfo.go#L156: tag := strings.TrimSuffix(parts[1], "/")
versions.go#L341: v = strings.TrimSuffix(v, "+incompatible")
golang.org/x/pkgsite/internal/godoc/dochtml
symbol.go#L126: Synopsis: strings.TrimSuffix(strings.TrimSuffix(render.OneLineNodeDepth(fset, spec, 0), "{ ... }"), "{}"),
golang.org/x/pkgsite/internal/godoc/dochtml/internal/render
idents.go#L245: if _, _, ok := r.lookup(strings.TrimSuffix(s, "s")); ok {
idents.go#L249: if _, _, ok := r.lookup(strings.TrimSuffix(s, "es")); ok {
linkify.go#L464: for i := strings.Count(strings.TrimSuffix(lit, "\n"), "\n"); i >= 0; i-- {
golang.org/x/pkgsite/internal/postgres
path.go#L59: modPath := strings.TrimSuffix(p, "/"+suffix)
golang.org/x/pkgsite/internal/proxy
test_helper.go#L76: modver := strings.TrimSuffix(filepath.Base(filename), filepath.Ext(filename))
golang.org/x/pkgsite/internal/source
source.go#L76: return strings.TrimSuffix(expand(i.templates.Directory, map[string]string{
source.go#L413: repoURL = strings.TrimSuffix(repoURL, ".git")
source.go#L428: repoURL: strings.TrimSuffix(repoURL, "/"),
source.go#L538: return strings.TrimSuffix(dir, "/")
source.go#L770: v := strings.TrimSuffix(vers, "+incompatible")
source.go#L800: return strings.TrimSuffix(repoURL, ".git")
golang.org/x/pkgsite/internal/stdlib
stdlib.go#L107: versionWithoutPrerelease := strings.TrimSuffix(goVersion, prerelease)
stdlib.go#L110: versionWithoutPrerelease = strings.TrimSuffix(versionWithoutPrerelease, ".0")
golang.org/x/pkgsite/internal/symbol
apigodoc.go#L41: v := strings.TrimSuffix(base, ".txt")
apigodoc.go#L131: ver := strings.TrimSuffix(base, ".txt")
golang.org/x/pkgsite/internal/worker
server.go#L349: modulePath := strings.TrimSuffix(p, "/@latest")
google.golang.org/grpc/credentials/alts
utils.go#L67: for _, line := range strings.Split(strings.TrimSuffix(string(out), "\n"), "\n") {
google.golang.org/grpc/internal/transport
http2_client.go#L515: host := strings.TrimSuffix(callHdr.Host, ":443")
google.golang.org/protobuf/encoding/protojson
well_known_types.go#L615: x = strings.TrimSuffix(x, "000")
well_known_types.go#L616: x = strings.TrimSuffix(x, "000")
well_known_types.go#L617: x = strings.TrimSuffix(x, ".000")
well_known_types.go#L797: x = strings.TrimSuffix(x, "000")
well_known_types.go#L798: x = strings.TrimSuffix(x, "000")
well_known_types.go#L799: x = strings.TrimSuffix(x, ".000")
google.golang.org/protobuf/reflect/protoregistry
registry.go#L114: pkgName := strings.TrimSuffix(strings.TrimPrefix(path, "google/protobuf/"), ".proto")
internal/lazyregexp
lazyre.go#L66: var inTest = len(os.Args) > 0 && strings.HasSuffix(strings.TrimSuffix(os.Args[0], ".exe"), ".test")
net/http
fs.go#L638: index := strings.TrimSuffix(name, "/") + indexPage
http.go#L56: return strings.TrimSuffix(host, ":")
 |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |