go-internal

module
v1.0.1-alpha.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2019 License: BSD-3-Clause

README

This repository factors out an opinionated selection of internal packages and functionality from the Go standard library. Currently this consists mostly of packages and testing code from within the Go tool implementation.

Included are the following:

  • dirhash: calculate hashes over directory trees the same way that the Go tool does.
  • goproxytest: a GOPROXY implementation designed for test use.
  • gotooltest: Use the Go tool inside test scripts (see testscript below)
  • imports: list of known architectures and OSs, and support for reading import import statements.
  • modfile: read and write go.mod files while preserving formatting and comments.
  • module: module paths and versions.
  • par: do work in parallel.
  • semver: semantic version parsing.
  • testenv: information on the current testing environment.
  • testscript: script-based testing based on txtar files
  • txtar: simple text-based file archives for testing.

Directories

Path Synopsis
Package cache implements a build artifact cache.
Package cache implements a build artifact cache.
cmd
txtar-addmod
The txtar-addmod command adds a module as a txtar archive to the a testdata module directory as understood by the goproxytest package (see https://godoc.org/github.com/rogpeppe/go-internal/goproxytest).
The txtar-addmod command adds a module as a txtar archive to the a testdata module directory as understood by the goproxytest package (see https://godoc.org/github.com/rogpeppe/go-internal/goproxytest).
txtar-goproxy
The txtar-goproxy command runs a Go module proxy from a txtar module directory (as manipulated by the txtar-addmod command).
The txtar-goproxy command runs a Go module proxy from a txtar module directory (as manipulated by the txtar-addmod command).
txtar-savedir
The txtar-savedir command archives a directory tree as a txtar archive printed to standard output.
The txtar-savedir command archives a directory tree as a txtar archive printed to standard output.
txtar-x
The txtar-x command extracts a txtar archive to a filesystem.
The txtar-x command extracts a txtar archive to a filesystem.
Package dirhash defines hashes over directory trees.
Package dirhash defines hashes over directory trees.
Package goproxytest serves Go modules from a proxy server designed to run on localhost during tests, both to make tests avoid requiring specific network servers and also to make them significantly faster.
Package goproxytest serves Go modules from a proxy server designed to run on localhost during tests, both to make tests avoid requiring specific network servers and also to make them significantly faster.
Package gotooltest implements functionality useful for testing tools that use the go command.
Package gotooltest implements functionality useful for testing tools that use the go command.
internal
textutil
package textutil contains text processing utilities.
package textutil contains text processing utilities.
Package modfile implements parsing and formatting for go.mod files.
Package modfile implements parsing and formatting for go.mod files.
Package module defines the module.Version type along with support code.
Package module defines the module.Version type along with support code.
Package par implements parallel execution helpers.
Package par implements parallel execution helpers.
Package renameio writes files atomically by renaming temporary files.
Package renameio writes files atomically by renaming temporary files.
Package semver implements comparison of semantic version strings.
Package semver implements comparison of semantic version strings.
Package testenv provides information about what functionality is available in different testing environments run by the Go team.
Package testenv provides information about what functionality is available in different testing environments run by the Go team.
Package testscript provides support for defining filesystem-based tests by creating scripts in a directory.
Package testscript provides support for defining filesystem-based tests by creating scripts in a directory.
Package txtar implements a trivial text-based file archive format.
Package txtar implements a trivial text-based file archive format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL