Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for zip (0.09 sec)

  1. lib/time/mkzip.go

    //go:build ignore
    
    // Mkzip writes a zoneinfo.zip with the content of the current directory
    // and its subdirectories, with no compression, suitable for package time.
    //
    // Usage:
    //
    //	go run ../../mkzip.go ../../zoneinfo.zip
    //
    // We use this program instead of 'zip -0 -r ../../zoneinfo.zip *' to get
    // a reproducible generator that does not depend on which version of the
    // external zip tool is used or the ordering of file names in a directory
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:32:07 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. src/cmd/go/internal/modfetch/codehost/shell.go

    			}
    			data, err := repo.ReadFile(f[1], f[2], 10<<20)
    			if err != nil {
    				fmt.Fprintf(os.Stderr, "?%s\n", err)
    				continue
    			}
    			os.Stdout.Write(data)
    
    		case "zip":
    			if len(f) != 4 {
    				fmt.Fprintf(os.Stderr, "?usage: zip rev subdir output\n")
    				continue
    			}
    			subdir := f[2]
    			if subdir == "-" {
    				subdir = ""
    			}
    			rc, err := repo.ReadZip(f[1], subdir, 10<<20)
    			if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 2.8K bytes
    - Viewed (0)
  3. src/archive/zip/example_test.go

    // license that can be found in the LICENSE file.
    
    package zip_test
    
    import (
    	"archive/zip"
    	"bytes"
    	"compress/flate"
    	"fmt"
    	"io"
    	"log"
    	"os"
    )
    
    func ExampleWriter() {
    	// Create a buffer to write our archive to.
    	buf := new(bytes.Buffer)
    
    	// Create a new zip archive.
    	w := zip.NewWriter(buf)
    
    	// Add some files to the archive.
    	var files = []struct {
    		Name, Body string
    	}{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 27 00:22:03 UTC 2016
    - 2K bytes
    - Viewed (0)
  4. src/cmd/go/internal/modcmd/verify.go

    		return nil
    	}
    	if modload.MainModules.Contains(mod.Path) {
    		return nil
    	}
    	var errs []error
    	zip, zipErr := modfetch.CachePath(ctx, mod, "zip")
    	if zipErr == nil {
    		_, zipErr = os.Stat(zip)
    	}
    	dir, dirErr := modfetch.DownloadDir(ctx, mod)
    	data, err := os.ReadFile(zip + "hash")
    	if err != nil {
    		if zipErr != nil && errors.Is(zipErr, fs.ErrNotExist) &&
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 16:56:35 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  5. src/cmd/go/internal/vcweb/script.go

    	"errors"
    	"fmt"
    	"internal/txtar"
    	"io"
    	"log"
    	"net/http"
    	"os"
    	"os/exec"
    	"path/filepath"
    	"runtime"
    	"strconv"
    	"strings"
    	"time"
    
    	"golang.org/x/mod/module"
    	"golang.org/x/mod/zip"
    )
    
    // newScriptEngine returns a script engine augmented with commands for
    // reproducing version-control repositories by replaying commits.
    func newScriptEngine() *script.Engine {
    	conds := script.DefaultConds()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 08 19:37:03 UTC 2022
    - 9K bytes
    - Viewed (0)
  6. src/cmd/go/internal/modfetch/zip_sum_test/zip_sum_test.go

    // Package zip_sum_test tests that the module zip files produced by modfetch
    // have consistent content sums. Ideally the zip files themselves are also
    // stable over time, though this is not strictly necessary.
    //
    // This test loads a table from testdata/zip_sums.csv. The table has columns
    // for module path, version, content sum, and zip file hash. The table
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 18 19:33:59 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  7. src/cmd/go/internal/modfetch/codehost/svn.go

    	// Scrape the exported files out of the filesystem and encode them in the zipfile.
    
    	// “All files in the zip file are expected to be
    	// nested in a single top-level directory, whose name is not specified.”
    	// We'll (arbitrarily) choose the base of the remote path.
    	basePath := path.Join(path.Base(remote), subdir)
    
    	zw := zip.NewWriter(dst)
    	for _, e := range list.Entries {
    		if e.Kind != "file" {
    			continue
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 19 02:47:12 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  8. src/cmd/go/internal/modfetch/toolchain.go

    func (r *toolchainRepo) GoMod(ctx context.Context, version string) (data []byte, err error) {
    	return []byte("module " + r.path + "\n"), nil
    }
    
    func (r *toolchainRepo) Zip(ctx context.Context, dst io.Writer, version string) error {
    	return fmt.Errorf("invalid use of toolchainRepo: Zip")
    }
    
    func (r *toolchainRepo) CheckReuse(ctx context.Context, old *codehost.Origin) error {
    	return fmt.Errorf("invalid use of toolchainRepo: CheckReuse")
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 13 16:44:24 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  9. src/archive/zip/register.go

    // Copyright 2010 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.
    
    package zip
    
    import (
    	"compress/flate"
    	"errors"
    	"io"
    	"sync"
    )
    
    // A Compressor returns a new compressing writer, writing to w.
    // The WriteCloser's Close method must be used to flush pending data to w.
    // The Compressor itself must be safe to invoke from multiple goroutines
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 18:36:46 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  10. src/cmd/dist/buildgo.go

    //
    //	package tzdata
    //	const zipdata = "PK..."
    func mktzdata(dir, file string) {
    	zip := readfile(filepath.Join(dir, "../../../lib/time/zoneinfo.zip"))
    
    	var buf strings.Builder
    	writeHeader(&buf)
    	fmt.Fprintf(&buf, "package tzdata\n")
    	fmt.Fprintln(&buf)
    	fmt.Fprintf(&buf, "const zipdata = %s\n", quote(zip))
    
    	writefile(buf.String(), file, writeSkipSame)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 13 20:44:00 UTC 2023
    - 4.3K bytes
    - Viewed (0)
Back to top