Documentation ¶
Overview ¶
Example ¶
This example is copied from rill to understand golang docs
package main import ( "fmt" ) func main() { fmt.Println("nothing here yet") }
Output:
Example (Batching) ¶
This example is copied from rill to understand golang docs
package main import ( "fmt" ) func main() { fmt.Println("nothing batching here yet") }
Output:
Index ¶
- Variables
- func IsGitDir(dir string) bool
- func ReleaseReportHeader() string
- func RunGitClone(newdir, basedir, giturl string) error
- func ValidGoVersion(ver string) (bool, error)
- type Forge
- func (f *Forge) AddFullPath(fulldir string) *gitpb.Repo
- func (f *Forge) Build(repo *gitpb.Repo, userFlags []string) error
- func (f *Forge) CheckOverride(gopath string) bool
- func (f *Forge) CheckoutDevel() bool
- func (f *Forge) CheckoutMaster() bool
- func (f *Forge) CheckoutUser() bool
- func (f *Forge) CheckoutUserForce() bool
- func (f *Forge) ConfigPrintTable()
- func (f *Forge) ConfigSave() error
- func (f *Forge) DeleteByGoPath(gopath string) bool
- func (f *Forge) Exit()
- func (f *Forge) FinalGoDepsCheckOk(check *gitpb.Repo, verbose bool) bool
- func (f *Forge) FindAnyPath(dir string) *gitpb.Repo
- func (f *Forge) FindByGoPath(gopath string) *gitpb.Repo
- func (f *Forge) FindWorkingDirRepo() *gitpb.Repo
- func (f *Forge) GetGoSrc() string
- func (f *Forge) GitPull() bool
- func (f *Forge) GoClone(gopath string) (*gitpb.Repo, error)
- func (f *Forge) HumanPrintRepo(check *gitpb.Repo)
- func (f *Forge) InitPB()
- func (f *Forge) Install(repo *gitpb.Repo, userFlags []string) error
- func (f *Forge) IsGoWork() bool
- func (f *Forge) MakeDevelBranch(repo *gitpb.Repo) error
- func (f *Forge) MakeDevelPatchSet() (*Patchset, error)
- func (f *Forge) MakeGoWork() error
- func (f *Forge) MakeMasterPatchSet() (*Patchset, error)
- func (f *Forge) MakeUserBranch(repo *gitpb.Repo) error
- func (f *Forge) NewGoRepo(gopath string, url string) (*gitpb.Repo, error)
- func (f *Forge) PrintHumanTable(allr *gitpb.Repos)
- func (f *Forge) PrintHumanTableDirty(allr *gitpb.Repos)
- func (f *Forge) PrintReleaseReport(repos *gitpb.Repos) int
- func (f *Forge) RillRedoGoMod() int
- func (f *Forge) ScanGoSrc() (bool, error)
- func (f *Forge) SendPatchSet(pset *Patchset) error
- func (f *Forge) SetConfigSave(b bool)
- func (f *Forge) StandardReleaseHeader(repo *gitpb.Repo, state string) string
- func (f *Forge) ValidGoVersion(ver string) (bool, error)
- func (f *Forge) VerifyBranchNames(repo *gitpb.Repo)
- type Module
- type ModuleError
- type Origin
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var INFO *log.LogFlag
var WARN *log.LogFlag
Functions ¶
func IsGitDir ¶ added in v0.0.7
IsGitDir checks if a .git directory exists inside the given directory
func ReleaseReportHeader ¶ added in v0.0.16
func ReleaseReportHeader() string
func RunGitClone ¶ added in v0.0.39
git clone (also downloads git notes) newdir = helloworld basedir = /home/jcarr/go/src/go.wit.com/apps giturl = https://gitea.wit.com/gui/helloworld
func ValidGoVersion ¶ added in v0.0.44
Types ¶
type Forge ¶ added in v0.0.7
type Forge struct { Config *ForgeConfigs // config repos for readonly, private, etc Repos *gitpb.Repos Machine *zoopb.Machine // contains filtered or unexported fields }
maybe an interface someday?
func DetermineGoPath ¶ added in v0.0.47
func DetermineGoPath() *Forge
func Init ¶ added in v0.0.7
func Init() *Forge
todo: use initOnce cache.go has Do() f.initOnce.Do(f.initWork)
func InitPB ¶ added in v0.0.29
func InitPB() *Forge
only init's the protobuf. intended to not scan or change anything
func (*Forge) AddFullPath ¶ added in v0.0.36
func (*Forge) CheckOverride ¶ added in v0.0.28
func (*Forge) CheckoutDevel ¶ added in v0.0.18
func (*Forge) CheckoutMaster ¶ added in v0.0.18
func (*Forge) CheckoutUser ¶ added in v0.0.18
func (*Forge) CheckoutUserForce ¶ added in v0.0.44
func (*Forge) ConfigPrintTable ¶ added in v0.0.7
func (f *Forge) ConfigPrintTable()
print a human readable table to STDOUT
func (*Forge) ConfigSave ¶ added in v0.0.7
func (*Forge) DeleteByGoPath ¶ added in v0.0.37
func (*Forge) Exit ¶ added in v0.0.37
func (f *Forge) Exit()
saves the config if there have been changes
func (*Forge) FinalGoDepsCheckOk ¶ added in v0.0.16
DOES NOT MODIFY ANYTHING
this is a final check to make sure, before pushing a golang repo, that the go.sum file has the correct and current version of every package
it re-scans the go.sum file. DOES NOT MODIFY ANYTHING this is the last thing to run to double check everything before 'git tag' or git push --tags
func (*Forge) FindAnyPath ¶ added in v0.0.39
tries any parent
func (*Forge) FindByGoPath ¶ added in v0.0.37
func (*Forge) FindWorkingDirRepo ¶ added in v0.0.35
sortcut to find
func (*Forge) GoClone ¶ added in v0.0.39
will not violate filesystem namespace always returns the path or a parent path
attemps to exec git clone based off of a golang path will transferse parent directories in case the path is a child of a git repo
returns *gitpb.Repo if already cloned
example gopath = go.wit.com/apps/go-clone or "go.googlesource.com/go/src/cmd/internal/pkgpath/" returns repo for "go.googlesource.com/go"
func (*Forge) HumanPrintRepo ¶ added in v0.0.44
func (*Forge) MakeDevelBranch ¶ added in v0.0.28
func (*Forge) MakeDevelPatchSet ¶ added in v0.0.28
func (*Forge) MakeMasterPatchSet ¶ added in v0.0.28
func (*Forge) MakeUserBranch ¶ added in v0.0.28
func (*Forge) PrintHumanTable ¶ added in v0.0.44
func (*Forge) PrintHumanTableDirty ¶ added in v0.0.49
also shows which files are dirty
func (*Forge) PrintReleaseReport ¶ added in v0.0.37
func (*Forge) RillRedoGoMod ¶ added in v0.0.19
func (*Forge) SendPatchSet ¶ added in v0.0.28
func (*Forge) SetConfigSave ¶ added in v0.0.37
func (*Forge) StandardReleaseHeader ¶ added in v0.0.16
show information while doing golang releases
func (*Forge) ValidGoVersion ¶ added in v0.0.36
golang versions MUST be vX.X.X it can not be vX.X and it also can not be v0.0.0 verifies the version is format v3.2.1 this is retardedly wrong. it needs to be done right
func (*Forge) VerifyBranchNames ¶ added in v0.0.13
this is still in flux
type Module ¶ added in v0.0.8
type Module struct { Path string // module path Query string // version query corresponding to this version Version string // module version Versions []string // available module versions Replace *Module // replaced by this module Time *time.Time // time version was created Update *Module // available update (with -u) Main bool // is this the main module? Indirect bool // module is only indirectly needed by main module Dir string // directory holding local copy of files, if any GoMod string // path to go.mod file describing module, if any GoVersion string // go version used in module Retracted []string // retraction information, if any (with -retracted or -u) Deprecated string // deprecation message, if any (with -u) Error *ModuleError // error loading module Sum string // checksum for path, version (as in go.sum) GoModSum string // checksum for go.mod (as in go.sum) Reuse bool // reuse of old module info is safe Origin Origin }
type ModuleError ¶ added in v0.0.8
type ModuleError struct {
Err string // the error itself
}
type Origin ¶ added in v0.0.8
type Origin struct { VCS string `json:",omitempty"` // "git" etc URL string `json:",omitempty"` // URL of repository Subdir string `json:",omitempty"` // subdirectory in repo Hash string `json:",omitempty"` // commit hash or ID // If TagSum is non-empty, then the resolution of this module version // depends on the set of tags present in the repo, specifically the tags // of the form TagPrefix + a valid semver version. // If the matching repo tags and their commit hashes still hash to TagSum, // the Origin is still valid (at least as far as the tags are concerned). // The exact checksum is up to the Repo implementation; see (*gitRepo).Tags. TagPrefix string `json:",omitempty"` TagSum string `json:",omitempty"` // If Ref is non-empty, then the resolution of this module version // depends on Ref resolving to the revision identified by Hash. // If Ref still resolves to Hash, the Origin is still valid (at least as far as Ref is concerned). // For Git, the Ref is a full ref like "refs/heads/main" or "refs/tags/v1.2.3", // and the Hash is the Git object hash the ref maps to. // Other VCS might choose differently, but the idea is that Ref is the name // with a mutable meaning while Hash is a name with an immutable meaning. Ref string `json:",omitempty"` // If RepoSum is non-empty, then the resolution of this module version // failed due to the repo being available but the version not being present. // This depends on the entire state of the repo, which RepoSum summarizes. // For Git, this is a hash of all the refs and their hashes. RepoSum string `json:",omitempty"` }
An Origin describes the provenance of a given repo method result. It can be passed to CheckReuse (usually in a different go command invocation) to see whether the result remains up-to-date.