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) 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) RillFuncError(rillf func(*gitpb.Repo) error) int
- func (f *Forge) RillRedoGoMod() int
- func (f *Forge) RillReload() 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 ForgeConfig
- func (*ForgeConfig) Descriptor() ([]byte, []int)deprecated
- func (x *ForgeConfig) GetDebName() string
- func (x *ForgeConfig) GetDevelBranchName() string
- func (x *ForgeConfig) GetDirectory() bool
- func (x *ForgeConfig) GetFavorite() bool
- func (x *ForgeConfig) GetGoPath() string
- func (x *ForgeConfig) GetGoSrc() string
- func (x *ForgeConfig) GetInteresting() bool
- func (x *ForgeConfig) GetMasterBranchName() string
- func (x *ForgeConfig) GetPrivate() bool
- func (x *ForgeConfig) GetReadOnly() bool
- func (x *ForgeConfig) GetUserBranchName() string
- func (x *ForgeConfig) GetVerstamp() *timestamppb.Timestamp
- func (x *ForgeConfig) GetWritable() bool
- func (*ForgeConfig) ProtoMessage()
- func (x *ForgeConfig) ProtoReflect() protoreflect.Message
- func (x *ForgeConfig) Reset()
- func (x *ForgeConfig) String() string
- type ForgeConfigGoPath
- type ForgeConfigIterator
- type ForgeConfigs
- func (x *ForgeConfigs) All() *ForgeConfigIterator
- func (x *ForgeConfigs) Append(y *ForgeConfig)
- func (x *ForgeConfigs) AppendByGoPath(y *ForgeConfig) bool
- func (c *ForgeConfigs) ConfigLoad() error
- func (f *ForgeConfigs) ConfigSave() error
- func (fc *ForgeConfigs) DebName(gopath string) string
- func (x *ForgeConfigs) DeleteByGoPath(s string) bool
- func (*ForgeConfigs) Descriptor() ([]byte, []int)deprecated
- func (x *ForgeConfigs) FindByGoPath(s string) *ForgeConfig
- func (fc *ForgeConfigs) FindDevelBranch(thing string) string
- func (fc *ForgeConfigs) FindMasterBranch(thing string) string
- func (fc *ForgeConfigs) FindUserBranch(thing string) string
- func (v *ForgeConfigs) FormatJSON() string
- func (v *ForgeConfigs) FormatTEXT() string
- func (x *ForgeConfigs) GetForgeConfigs() []*ForgeConfig
- func (x *ForgeConfigs) GetUsername() string
- func (x *ForgeConfigs) GetUuid() string
- func (x *ForgeConfigs) GetVersion() string
- func (x *ForgeConfigs) GetXterm() string
- func (x *ForgeConfigs) GetXtermArgv() []string
- func (fc *ForgeConfigs) IsFavorite(thing string) bool
- func (fc *ForgeConfigs) IsPrivate(thing string) bool
- func (fc *ForgeConfigs) IsReadOnly(gopath string) bool
- func (fc *ForgeConfigs) IsWritable(thing string) bool
- func (x *ForgeConfigs) Len() int
- func (v *ForgeConfigs) Marshal() ([]byte, error)
- func (v *ForgeConfigs) MarshalJSON() ([]byte, error)
- func (*ForgeConfigs) ProtoMessage()
- func (x *ForgeConfigs) ProtoReflect() protoreflect.Message
- func (x *ForgeConfigs) Reset()
- func (x *ForgeConfigs) SortByGoPath() *ForgeConfigIterator
- func (x *ForgeConfigs) String() string
- func (v *ForgeConfigs) Unmarshal(data []byte) error
- func (v *ForgeConfigs) UnmarshalJSON(data []byte) error
- func (v *ForgeConfigs) UnmarshalTEXT(data []byte) error
- type ForgeConfigsIterator
- type Module
- type ModuleError
- type Origin
- type Patch
- func (*Patch) Descriptor() ([]byte, []int)deprecated
- func (x *Patch) GetBranchHash() string
- func (x *Patch) GetBranchName() string
- func (x *Patch) GetCommitHash() string
- func (x *Patch) GetCtime() *timestamppb.Timestamp
- func (x *Patch) GetData() []byte
- func (x *Patch) GetFilename() string
- func (x *Patch) GetFiles() []string
- func (x *Patch) GetRepoPath() string
- func (x *Patch) GetStartHash() string
- func (*Patch) ProtoMessage()
- func (x *Patch) ProtoReflect() protoreflect.Message
- func (x *Patch) Reset()
- func (x *Patch) String() string
- type PatchFilename
- type PatchIterator
- type Patches
- func (x *Patches) All() *PatchIterator
- func (x *Patches) Append(y *Patch)
- func (x *Patches) AppendByFilename(y *Patch) bool
- func (x *Patches) DeleteByFilename(s string) bool
- func (*Patches) Descriptor() ([]byte, []int)deprecated
- func (x *Patches) FindByFilename(s string) *Patch
- func (v *Patches) FormatJSON() string
- func (v *Patches) FormatTEXT() string
- func (x *Patches) GetPatches() []*Patch
- func (x *Patches) GetUuid() string
- func (x *Patches) GetVersion() string
- func (x *Patches) Len() int
- func (v *Patches) Marshal() ([]byte, error)
- func (v *Patches) MarshalJSON() ([]byte, error)
- func (*Patches) ProtoMessage()
- func (x *Patches) ProtoReflect() protoreflect.Message
- func (x *Patches) Reset()
- func (x *Patches) SortByFilename() *PatchIterator
- func (x *Patches) String() string
- func (v *Patches) Unmarshal(data []byte) error
- func (v *Patches) UnmarshalJSON(data []byte) error
- func (v *Patches) UnmarshalTEXT(data []byte) error
- type PatchesIterator
- type Patchset
- func (*Patchset) Descriptor() ([]byte, []int)deprecated
- func (v *Patchset) FormatJSON() string
- func (v *Patchset) FormatTEXT() string
- func (x *Patchset) GetComment() string
- func (x *Patchset) GetCtime() *timestamppb.Timestamp
- func (x *Patchset) GetEndBranchHash() string
- func (x *Patchset) GetEndBranchName() string
- func (x *Patchset) GetGitAuthorEmail() string
- func (x *Patchset) GetGitAuthorName() string
- func (x *Patchset) GetName() string
- func (x *Patchset) GetPatches() *Patches
- func (x *Patchset) GetStartBranchHash() string
- func (x *Patchset) GetStartBranchName() string
- func (x *Patchset) GetTmpDir() string
- func (v *Patchset) Marshal() ([]byte, error)
- func (v *Patchset) MarshalJSON() ([]byte, error)
- func (*Patchset) ProtoMessage()
- func (x *Patchset) ProtoReflect() protoreflect.Message
- func (x *Patchset) Reset()
- func (x *Patchset) String() string
- func (v *Patchset) Unmarshal(data []byte) error
- func (v *Patchset) UnmarshalJSON(data []byte) error
- func (v *Patchset) UnmarshalTEXT(data []byte) error
- type PatchsetGitAuthorName
- type PatchsetIterator
- type PatchsetName
- type Patchsets
- func (x *Patchsets) All() *PatchsetIterator
- func (x *Patchsets) Append(y *Patchset)
- func (*Patchsets) Descriptor() ([]byte, []int)deprecated
- func (v *Patchsets) FormatJSON() string
- func (v *Patchsets) FormatTEXT() string
- func (x *Patchsets) GetPatchsets() []*Patchset
- func (x *Patchsets) GetUuid() string
- func (x *Patchsets) GetVersion() string
- func (x *Patchsets) Len() int
- func (v *Patchsets) Marshal() ([]byte, error)
- func (v *Patchsets) MarshalJSON() ([]byte, error)
- func (*Patchsets) ProtoMessage()
- func (x *Patchsets) ProtoReflect() protoreflect.Message
- func (x *Patchsets) Reset()
- func (x *Patchsets) SortByGitAuthorName() *PatchsetIterator
- func (x *Patchsets) SortByName() *PatchsetIterator
- func (x *Patchsets) String() string
- func (v *Patchsets) Unmarshal(data []byte) error
- func (v *Patchsets) UnmarshalJSON(data []byte) error
- func (v *Patchsets) UnmarshalTEXT(data []byte) error
- type PatchsetsIterator
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var File_forgeConfig_proto protoreflect.FileDescriptor
var File_patchset_proto protoreflect.FileDescriptor
var INFO *log.LogFlag
var RillX int = 30
var RillY int = 10
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) 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) RillFuncError ¶ added in v0.0.54
x is the size of the queued up pool (shouldn't matter here for this I think) y is how many simultanous functions will run todo: tune and compute x,y by # of CPUs and disk io todo: store x,y in forge config ? (or compute them. notsure)
func (*Forge) RillRedoGoMod ¶ added in v0.0.19
func (*Forge) RillReload ¶ added in v0.0.55
x is the size of the queued up pool (shouldn't matter here for this I think) y is how many simultanous functions will run todo: tune and compute x,y by # of CPUs and disk io todo: store x,y in forge config ? (or compute them. notsure)
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 ForgeConfig ¶ added in v0.0.7
type ForgeConfig struct { GoPath string `protobuf:"bytes,1,opt,name=goPath,proto3" json:"goPath,omitempty"` // `autogenpb:unique` `autogenpb:sort` // Examples: 'go.wit.com/apps/go-clone' or "~/mythings" or "/home/src/foo" Writable bool `protobuf:"varint,2,opt,name=writable,proto3" json:"writable,omitempty"` // if you have write access to the repo ReadOnly bool `protobuf:"varint,3,opt,name=readOnly,proto3" json:"readOnly,omitempty"` // the opposite, but needed for now because I don't know what I'm doing Private bool `protobuf:"varint,4,opt,name=private,proto3" json:"private,omitempty"` // if the repo can be published Directory bool `protobuf:"varint,5,opt,name=directory,proto3" json:"directory,omitempty"` // everything in this directory should use these writable & private values Favorite bool `protobuf:"varint,6,opt,name=favorite,proto3" json:"favorite,omitempty"` // you like this. always git clone/go clone this repo Interesting bool `protobuf:"varint,7,opt,name=interesting,proto3" json:"interesting,omitempty"` // this is something interesting you found and want to remember it MasterBranchName string `protobuf:"bytes,8,opt,name=masterBranchName,proto3" json:"masterBranchName,omitempty"` // git 'main' or 'master' branch name DevelBranchName string `protobuf:"bytes,9,opt,name=develBranchName,proto3" json:"develBranchName,omitempty"` // whatever the git 'devel' branch name is UserBranchName string `protobuf:"bytes,10,opt,name=userBranchName,proto3" json:"userBranchName,omitempty"` // whatever your username branch is DebName string `protobuf:"bytes,11,opt,name=debName,proto3" json:"debName,omitempty"` // the actual name used with 'apt install' (or distro apt equivalent. Verstamp *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=verstamp,proto3" json:"verstamp,omitempty"` // the git commit timestamp of the version GoSrc string `protobuf:"bytes,13,opt,name=goSrc,proto3" json:"goSrc,omitempty"` // is ~/go/src unless a go.work file is found // contains filtered or unexported fields }
define 3 branches. that is all that is supported the term 'master' is used in the code because 'main' is a reserved word in golang already allow 'read only' and 'private' flags package names sometimes must be different than the binary name for example 'zookeeper' is packaged as 'zookeeper-go'
due to the prior apache foundation project. This happens and is ok!
func (*ForgeConfig) Descriptor
deprecated
added in
v0.0.7
func (*ForgeConfig) Descriptor() ([]byte, []int)
Deprecated: Use ForgeConfig.ProtoReflect.Descriptor instead.
func (*ForgeConfig) GetDebName ¶ added in v0.0.7
func (x *ForgeConfig) GetDebName() string
func (*ForgeConfig) GetDevelBranchName ¶ added in v0.0.7
func (x *ForgeConfig) GetDevelBranchName() string
func (*ForgeConfig) GetDirectory ¶ added in v0.0.7
func (x *ForgeConfig) GetDirectory() bool
func (*ForgeConfig) GetFavorite ¶ added in v0.0.7
func (x *ForgeConfig) GetFavorite() bool
func (*ForgeConfig) GetGoPath ¶ added in v0.0.7
func (x *ForgeConfig) GetGoPath() string
func (*ForgeConfig) GetGoSrc ¶ added in v0.0.23
func (x *ForgeConfig) GetGoSrc() string
func (*ForgeConfig) GetInteresting ¶ added in v0.0.7
func (x *ForgeConfig) GetInteresting() bool
func (*ForgeConfig) GetMasterBranchName ¶ added in v0.0.7
func (x *ForgeConfig) GetMasterBranchName() string
func (*ForgeConfig) GetPrivate ¶ added in v0.0.7
func (x *ForgeConfig) GetPrivate() bool
func (*ForgeConfig) GetReadOnly ¶ added in v0.0.7
func (x *ForgeConfig) GetReadOnly() bool
func (*ForgeConfig) GetUserBranchName ¶ added in v0.0.7
func (x *ForgeConfig) GetUserBranchName() string
func (*ForgeConfig) GetVerstamp ¶ added in v0.0.7
func (x *ForgeConfig) GetVerstamp() *timestamppb.Timestamp
func (*ForgeConfig) GetWritable ¶ added in v0.0.7
func (x *ForgeConfig) GetWritable() bool
func (*ForgeConfig) ProtoMessage ¶ added in v0.0.7
func (*ForgeConfig) ProtoMessage()
func (*ForgeConfig) ProtoReflect ¶ added in v0.0.7
func (x *ForgeConfig) ProtoReflect() protoreflect.Message
func (*ForgeConfig) Reset ¶ added in v0.0.7
func (x *ForgeConfig) Reset()
func (*ForgeConfig) String ¶ added in v0.0.7
func (x *ForgeConfig) String() string
type ForgeConfigGoPath ¶ added in v0.0.11
type ForgeConfigGoPath []*ForgeConfig
sort struct by GoPath
func (ForgeConfigGoPath) Len ¶ added in v0.0.11
func (a ForgeConfigGoPath) Len() int
func (ForgeConfigGoPath) Less ¶ added in v0.0.11
func (a ForgeConfigGoPath) Less(i, j int) bool
func (ForgeConfigGoPath) Swap ¶ added in v0.0.11
func (a ForgeConfigGoPath) Swap(i, j int)
type ForgeConfigIterator ¶ added in v0.0.7
type ForgeConfigIterator struct { sync.RWMutex // this isn't getting used properly yet? // contains filtered or unexported fields }
func (*ForgeConfigIterator) Next ¶ added in v0.0.7
func (it *ForgeConfigIterator) Next() *ForgeConfig
Next() returns the next thing in the array
func (*ForgeConfigIterator) Scan ¶ added in v0.0.7
func (it *ForgeConfigIterator) Scan() bool
type ForgeConfigs ¶ added in v0.0.7
type ForgeConfigs struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // `autogenpb:uuid:1941cd4f-1cfd-4bf6-aa75-c2c391907e81` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // `autogenpb:version:v0.0.47` ForgeConfigs []*ForgeConfig `protobuf:"bytes,3,rep,name=ForgeConfigs,proto3" json:"ForgeConfigs,omitempty"` Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` // what to use for the user branch (default ENV{USER}) Xterm string `protobuf:"bytes,14,opt,name=xterm,proto3" json:"xterm,omitempty"` // what xterm the user wants as the default XtermArgv []string `protobuf:"bytes,15,rep,name=xtermArgv,proto3" json:"xtermArgv,omitempty"` // the argv line for xterm // contains filtered or unexported fields }
func NewForgeConfigs ¶ added in v0.0.48
func NewForgeConfigs() *ForgeConfigs
func (*ForgeConfigs) All ¶ added in v0.0.7
func (x *ForgeConfigs) All() *ForgeConfigIterator
func (*ForgeConfigs) Append ¶ added in v0.0.7
func (x *ForgeConfigs) Append(y *ForgeConfig)
just a simple Append() shortcut (but still uses the mutex lock)
func (*ForgeConfigs) AppendByGoPath ¶ added in v0.0.47
func (x *ForgeConfigs) AppendByGoPath(y *ForgeConfig) bool
func (*ForgeConfigs) ConfigLoad ¶ added in v0.0.7
func (c *ForgeConfigs) ConfigLoad() error
load the ~/.config/forge/ files
func (*ForgeConfigs) ConfigSave ¶ added in v0.0.23
func (f *ForgeConfigs) ConfigSave() error
write to ~/.config/forge/ unless ENV{FORGE_CONFIG} is set
func (*ForgeConfigs) DebName ¶ added in v0.0.23
func (fc *ForgeConfigs) DebName(gopath string) string
returns the deb package name this let's you check a git tag version against a package .deb version allows gopath's to not need to match the .deb name this is important in lots of cases! It is normal and happens often enough.
func (*ForgeConfigs) DeleteByGoPath ¶ added in v0.0.7
func (x *ForgeConfigs) DeleteByGoPath(s string) bool
func (*ForgeConfigs) Descriptor
deprecated
added in
v0.0.7
func (*ForgeConfigs) Descriptor() ([]byte, []int)
Deprecated: Use ForgeConfigs.ProtoReflect.Descriptor instead.
func (*ForgeConfigs) FindByGoPath ¶ added in v0.0.7
func (x *ForgeConfigs) FindByGoPath(s string) *ForgeConfig
lookup a ForgeConfigs by the GoPath
func (*ForgeConfigs) FindDevelBranch ¶ added in v0.0.43
func (fc *ForgeConfigs) FindDevelBranch(thing string) string
allows custom devel branch names in the forge config
func (*ForgeConfigs) FindMasterBranch ¶ added in v0.0.43
func (fc *ForgeConfigs) FindMasterBranch(thing string) string
allows custom devel branch names in the forge config
func (*ForgeConfigs) FindUserBranch ¶ added in v0.0.41
func (fc *ForgeConfigs) FindUserBranch(thing string) string
allows custom user branch names in the forge config
func (*ForgeConfigs) FormatJSON ¶ added in v0.0.7
func (v *ForgeConfigs) FormatJSON() string
human readable JSON
func (*ForgeConfigs) FormatTEXT ¶ added in v0.0.7
func (v *ForgeConfigs) FormatTEXT() string
apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's brilliant for config files!
func (*ForgeConfigs) GetForgeConfigs ¶ added in v0.0.7
func (x *ForgeConfigs) GetForgeConfigs() []*ForgeConfig
func (*ForgeConfigs) GetUsername ¶ added in v0.0.41
func (x *ForgeConfigs) GetUsername() string
func (*ForgeConfigs) GetUuid ¶ added in v0.0.7
func (x *ForgeConfigs) GetUuid() string
func (*ForgeConfigs) GetVersion ¶ added in v0.0.7
func (x *ForgeConfigs) GetVersion() string
func (*ForgeConfigs) GetXterm ¶ added in v0.0.48
func (x *ForgeConfigs) GetXterm() string
func (*ForgeConfigs) GetXtermArgv ¶ added in v0.0.48
func (x *ForgeConfigs) GetXtermArgv() []string
func (*ForgeConfigs) IsFavorite ¶ added in v0.0.23
func (fc *ForgeConfigs) IsFavorite(thing string) bool
IsFavorite() -- fun option for the config file that lets you set things as favorites so you can just go-clone a bunch of common things on a new box or after you reset/delete your ~/go/src dir
func (*ForgeConfigs) IsPrivate ¶ added in v0.0.23
func (fc *ForgeConfigs) IsPrivate(thing string) bool
is this a non-publishable repo? matches package names from apt
IsPrivate("foo") will match anything in the config file ending in "foo"
IsPrivate("go.foo.com/jcarr/foo") returns true if private IsPrivate("foo") also returns true if "go.bar.com/jcarr/foo" is private
func (*ForgeConfigs) IsReadOnly ¶ added in v0.0.19
func (fc *ForgeConfigs) IsReadOnly(gopath string) bool
returns true if gopath is readonly() will attempt to match IsWritable("foo") against anything ending in "foo"
func (*ForgeConfigs) IsWritable ¶ added in v0.0.23
func (fc *ForgeConfigs) IsWritable(thing string) bool
IsWritable() checks your .config/forge/ settings looks for an exact match, then looks for a directory match
func (*ForgeConfigs) Len ¶ added in v0.0.7
func (x *ForgeConfigs) Len() int
func (*ForgeConfigs) Marshal ¶ added in v0.0.7
func (v *ForgeConfigs) Marshal() ([]byte, error)
marshal to wire. This is called winning.
func (*ForgeConfigs) MarshalJSON ¶ added in v0.0.7
func (v *ForgeConfigs) MarshalJSON() ([]byte, error)
marshal json
func (*ForgeConfigs) ProtoMessage ¶ added in v0.0.7
func (*ForgeConfigs) ProtoMessage()
func (*ForgeConfigs) ProtoReflect ¶ added in v0.0.7
func (x *ForgeConfigs) ProtoReflect() protoreflect.Message
func (*ForgeConfigs) Reset ¶ added in v0.0.7
func (x *ForgeConfigs) Reset()
func (*ForgeConfigs) SortByGoPath ¶ added in v0.0.11
func (x *ForgeConfigs) SortByGoPath() *ForgeConfigIterator
func (*ForgeConfigs) String ¶ added in v0.0.7
func (x *ForgeConfigs) String() string
func (*ForgeConfigs) Unmarshal ¶ added in v0.0.7
func (v *ForgeConfigs) Unmarshal(data []byte) error
unmarshal from wire. You have won.
func (*ForgeConfigs) UnmarshalJSON ¶ added in v0.0.7
func (v *ForgeConfigs) UnmarshalJSON(data []byte) error
unmarshal json
func (*ForgeConfigs) UnmarshalTEXT ¶ added in v0.0.7
func (v *ForgeConfigs) UnmarshalTEXT(data []byte) error
unmarshalTEXT. This reads the .text config file back in after the user edits it
type ForgeConfigsIterator ¶ added in v0.0.47
type ForgeConfigsIterator struct { sync.RWMutex // this isn't getting used properly yet? // contains filtered or unexported fields }
func (*ForgeConfigsIterator) Next ¶ added in v0.0.47
func (it *ForgeConfigsIterator) Next() *ForgeConfigs
Next() returns the next thing in the array
func (*ForgeConfigsIterator) Scan ¶ added in v0.0.47
func (it *ForgeConfigsIterator) Scan() bool
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.
type Patch ¶ added in v0.0.28
type Patch struct { sync.RWMutex // auto-added by go.wit.com/apps/autogenpb Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` // `autogenpb:unique` `autogenpb:sort` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // RepoPath string `protobuf:"bytes,3,opt,name=repoPath,proto3" json:"repoPath,omitempty"` // path to the git repo BranchName string `protobuf:"bytes,4,opt,name=branchName,proto3" json:"branchName,omitempty"` // BranchHash string `protobuf:"bytes,5,opt,name=branchHash,proto3" json:"branchHash,omitempty"` // Ctime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=ctime,proto3" json:"ctime,omitempty"` // the git commit timestamp of this patch CommitHash string `protobuf:"bytes,8,opt,name=commitHash,proto3" json:"commitHash,omitempty"` // the git commit hash of this patch StartHash string `protobuf:"bytes,9,opt,name=startHash,proto3" json:"startHash,omitempty"` // the start commit hash Files []string `protobuf:"bytes,10,rep,name=Files,proto3" json:"Files,omitempty"` // the filenames this patch changes // contains filtered or unexported fields }
func (*Patch) Descriptor
deprecated
added in
v0.0.28
func (*Patch) GetBranchHash ¶ added in v0.0.28
func (*Patch) GetBranchName ¶ added in v0.0.28
func (*Patch) GetCommitHash ¶ added in v0.0.43
func (*Patch) GetCtime ¶ added in v0.0.28
func (x *Patch) GetCtime() *timestamppb.Timestamp
func (*Patch) GetFilename ¶ added in v0.0.28
func (*Patch) GetRepoPath ¶ added in v0.0.28
func (*Patch) GetStartHash ¶ added in v0.0.43
func (*Patch) ProtoMessage ¶ added in v0.0.28
func (*Patch) ProtoMessage()
func (*Patch) ProtoReflect ¶ added in v0.0.28
func (x *Patch) ProtoReflect() protoreflect.Message
type PatchFilename ¶ added in v0.0.28
type PatchFilename []*Patch
sort struct by Filename
func (PatchFilename) Len ¶ added in v0.0.28
func (a PatchFilename) Len() int
func (PatchFilename) Less ¶ added in v0.0.28
func (a PatchFilename) Less(i, j int) bool
func (PatchFilename) Swap ¶ added in v0.0.28
func (a PatchFilename) Swap(i, j int)
type PatchIterator ¶ added in v0.0.28
type PatchIterator struct { sync.RWMutex // this isn't getting used properly yet? // contains filtered or unexported fields }
func (*PatchIterator) Next ¶ added in v0.0.28
func (it *PatchIterator) Next() *Patch
Next() returns the next thing in the array
func (*PatchIterator) Scan ¶ added in v0.0.28
func (it *PatchIterator) Scan() bool
type Patches ¶ added in v0.0.47
type Patches struct { sync.RWMutex // auto-added by go.wit.com/apps/autogenpb Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // `autogenpb:uuid:be926ad9-1111-484c-adf2-d96eeabf3079` // todo: add autogenpb support for this Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // `autogenpb:version:v0.0.45` // todo: add autogenpb support for this Patches []*Patch `protobuf:"bytes,3,rep,name=Patches,proto3" json:"Patches,omitempty"` // contains filtered or unexported fields }
func (*Patches) All ¶ added in v0.0.47
func (x *Patches) All() *PatchIterator
func (*Patches) Append ¶ added in v0.0.47
just a simple Append() shortcut (but still uses the mutex lock)
func (*Patches) AppendByFilename ¶ added in v0.0.47
func (*Patches) DeleteByFilename ¶ added in v0.0.47
func (*Patches) Descriptor
deprecated
added in
v0.0.47
func (*Patches) FindByFilename ¶ added in v0.0.47
lookup a Patches by the Filename
func (*Patches) FormatJSON ¶ added in v0.0.47
human readable JSON
func (*Patches) FormatTEXT ¶ added in v0.0.47
apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's brilliant for config files!
func (*Patches) GetPatches ¶ added in v0.0.47
func (*Patches) GetVersion ¶ added in v0.0.47
func (*Patches) MarshalJSON ¶ added in v0.0.47
marshal json
func (*Patches) ProtoMessage ¶ added in v0.0.47
func (*Patches) ProtoMessage()
func (*Patches) ProtoReflect ¶ added in v0.0.47
func (x *Patches) ProtoReflect() protoreflect.Message
func (*Patches) SortByFilename ¶ added in v0.0.47
func (x *Patches) SortByFilename() *PatchIterator
func (*Patches) UnmarshalJSON ¶ added in v0.0.47
unmarshal json
func (*Patches) UnmarshalTEXT ¶ added in v0.0.47
unmarshalTEXT. This reads the .text config file back in after the user edits it
type PatchesIterator ¶ added in v0.0.47
type PatchesIterator struct { sync.RWMutex // this isn't getting used properly yet? // contains filtered or unexported fields }
func (*PatchesIterator) Next ¶ added in v0.0.47
func (it *PatchesIterator) Next() *Patches
Next() returns the next thing in the array
func (*PatchesIterator) Scan ¶ added in v0.0.47
func (it *PatchesIterator) Scan() bool
type Patchset ¶ added in v0.0.46
type Patchset struct { sync.RWMutex // auto-added by go.wit.com/apps/autogenpb Patches *Patches `protobuf:"bytes,1,opt,name=patches,proto3" json:"patches,omitempty"` // `autogenpb:unique` `autogenpb:sort` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // `autogenpb:sort` Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` // GitAuthorName string `protobuf:"bytes,4,opt,name=gitAuthorName,proto3" json:"gitAuthorName,omitempty"` // `autogenpb:sort` GitAuthorEmail string `protobuf:"bytes,5,opt,name=gitAuthorEmail,proto3" json:"gitAuthorEmail,omitempty"` // Ctime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=ctime,proto3" json:"ctime,omitempty"` // create time of this patchset TmpDir string `protobuf:"bytes,7,opt,name=tmpDir,proto3" json:"tmpDir,omitempty"` // temp dir StartBranchName string `protobuf:"bytes,8,opt,name=startBranchName,proto3" json:"startBranchName,omitempty"` // EndBranchName string `protobuf:"bytes,9,opt,name=endBranchName,proto3" json:"endBranchName,omitempty"` // StartBranchHash string `protobuf:"bytes,10,opt,name=startBranchHash,proto3" json:"startBranchHash,omitempty"` // EndBranchHash string `protobuf:"bytes,11,opt,name=endBranchHash,proto3" json:"endBranchHash,omitempty"` // // contains filtered or unexported fields }
func (*Patchset) Descriptor
deprecated
added in
v0.0.46
func (*Patchset) FormatJSON ¶ added in v0.0.46
human readable JSON
func (*Patchset) FormatTEXT ¶ added in v0.0.46
apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's brilliant for config files!
func (*Patchset) GetComment ¶ added in v0.0.46
func (*Patchset) GetCtime ¶ added in v0.0.46
func (x *Patchset) GetCtime() *timestamppb.Timestamp
func (*Patchset) GetEndBranchHash ¶ added in v0.0.46
func (*Patchset) GetEndBranchName ¶ added in v0.0.46
func (*Patchset) GetGitAuthorEmail ¶ added in v0.0.46
func (*Patchset) GetGitAuthorName ¶ added in v0.0.46
func (*Patchset) GetPatches ¶ added in v0.0.46
func (*Patchset) GetStartBranchHash ¶ added in v0.0.46
func (*Patchset) GetStartBranchName ¶ added in v0.0.46
func (*Patchset) MarshalJSON ¶ added in v0.0.46
marshal json
func (*Patchset) ProtoMessage ¶ added in v0.0.46
func (*Patchset) ProtoMessage()
func (*Patchset) ProtoReflect ¶ added in v0.0.46
func (x *Patchset) ProtoReflect() protoreflect.Message
func (*Patchset) UnmarshalJSON ¶ added in v0.0.46
unmarshal json
func (*Patchset) UnmarshalTEXT ¶ added in v0.0.46
unmarshalTEXT. This reads the .text config file back in after the user edits it
type PatchsetGitAuthorName ¶ added in v0.0.46
type PatchsetGitAuthorName []*Patchset
sort struct by GitAuthorName
func (PatchsetGitAuthorName) Len ¶ added in v0.0.46
func (a PatchsetGitAuthorName) Len() int
func (PatchsetGitAuthorName) Less ¶ added in v0.0.46
func (a PatchsetGitAuthorName) Less(i, j int) bool
func (PatchsetGitAuthorName) Swap ¶ added in v0.0.46
func (a PatchsetGitAuthorName) Swap(i, j int)
type PatchsetIterator ¶ added in v0.0.46
type PatchsetIterator struct { sync.RWMutex // this isn't getting used properly yet? // contains filtered or unexported fields }
func (*PatchsetIterator) Next ¶ added in v0.0.46
func (it *PatchsetIterator) Next() *Patchset
Next() returns the next thing in the array
func (*PatchsetIterator) Scan ¶ added in v0.0.46
func (it *PatchsetIterator) Scan() bool
type PatchsetName ¶ added in v0.0.46
type PatchsetName []*Patchset
sort struct by Name
func (PatchsetName) Len ¶ added in v0.0.46
func (a PatchsetName) Len() int
func (PatchsetName) Less ¶ added in v0.0.46
func (a PatchsetName) Less(i, j int) bool
func (PatchsetName) Swap ¶ added in v0.0.46
func (a PatchsetName) Swap(i, j int)
type Patchsets ¶ added in v0.0.46
type Patchsets struct { sync.RWMutex // auto-added by go.wit.com/apps/autogenpb Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` // `autogenpb:uuid:be926ad9-f07f-484c-adf2-d96eeabf3079` // todo: add autogenpb support for this Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // `autogenpb:version:v0.0.45` // todo: add autogenpb support for this Patchsets []*Patchset `protobuf:"bytes,3,rep,name=Patchsets,proto3" json:"Patchsets,omitempty"` // contains filtered or unexported fields }
func NewPatchsets ¶ added in v0.0.48
func NewPatchsets() *Patchsets
func (*Patchsets) All ¶ added in v0.0.46
func (x *Patchsets) All() *PatchsetIterator
func (*Patchsets) Append ¶ added in v0.0.46
just a simple Append() shortcut (but still uses the mutex lock)
func (*Patchsets) Descriptor
deprecated
added in
v0.0.46
func (*Patchsets) FormatJSON ¶ added in v0.0.46
human readable JSON
func (*Patchsets) FormatTEXT ¶ added in v0.0.46
apparently this isn't stable, but it's awesomely better https://protobuf.dev/reference/go/faq/#unstable-text it's brilliant for config files!
func (*Patchsets) GetPatchsets ¶ added in v0.0.46
func (*Patchsets) GetVersion ¶ added in v0.0.46
func (*Patchsets) MarshalJSON ¶ added in v0.0.46
marshal json
func (*Patchsets) ProtoMessage ¶ added in v0.0.46
func (*Patchsets) ProtoMessage()
func (*Patchsets) ProtoReflect ¶ added in v0.0.46
func (x *Patchsets) ProtoReflect() protoreflect.Message
func (*Patchsets) SortByGitAuthorName ¶ added in v0.0.46
func (x *Patchsets) SortByGitAuthorName() *PatchsetIterator
func (*Patchsets) SortByName ¶ added in v0.0.46
func (x *Patchsets) SortByName() *PatchsetIterator
func (*Patchsets) UnmarshalJSON ¶ added in v0.0.46
unmarshal json
func (*Patchsets) UnmarshalTEXT ¶ added in v0.0.46
unmarshalTEXT. This reads the .text config file back in after the user edits it
type PatchsetsIterator ¶ added in v0.0.47
type PatchsetsIterator struct { sync.RWMutex // this isn't getting used properly yet? // contains filtered or unexported fields }
func (*PatchsetsIterator) Next ¶ added in v0.0.47
func (it *PatchsetsIterator) Next() *Patchsets
Next() returns the next thing in the array
func (*PatchsetsIterator) Scan ¶ added in v0.0.47
func (it *PatchsetsIterator) Scan() bool
Source Files
¶
- build.go
- cache.go
- clone.go
- config.go
- configBackup.go
- configDefault.go
- configLookup.go
- finalGoSumCheck.go
- forgeConfig.marshal.pb.go
- forgeConfig.pb.go
- forgeConfig.sort.pb.go
- gitCheckout.go
- goList.go
- goSrcFind.go
- goSrcScan.go
- goWork.go
- human.go
- humanShowRepo.go
- humanTable.go
- init.go
- log.go
- patchset.Make.go
- patchset.Send.go
- patchset.marshal.pb.go
- patchset.pb.go
- patchset.sort.pb.go
- repoNew.go
- rill.go
- run.go
- structs.go