Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Set indicates the attribute was specified, but without a state Set = "set" // Unset indicates the attribute was specified with a leading dash '-' Unset = "unset" // Unspecified indicates the attribute was not specified Unspecified = "unspecified" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct {
Name, State string
}
Attribute defines a single attribute. Name is the attribute and State can be either Set, Unset, or any other string value.
type Attributes ¶
type Attributes []Attribute
Attributes is a set of attributes.
func (Attributes) IsSet ¶
func (attrs Attributes) IsSet(name string) bool
IsSet checks if the given attribute is set to a "set" value
func (Attributes) IsUnset ¶
func (attrs Attributes) IsUnset(name string) bool
IsUnset checks if the given attribute is set to a "unset" value
type CheckAttrCmd ¶
type CheckAttrCmd struct {
// contains filtered or unexported fields
}
CheckAttrCmd can be used to get the gitattributes(5) for a set of files in a repo.
func CheckAttr ¶
func CheckAttr(ctx context.Context, repo git.RepositoryExecutor, revision git.Revision, names []string) (*CheckAttrCmd, func(), error)
CheckAttr creates a CheckAttrCmd that checks the given list of attribute names.
func (CheckAttrCmd) Check ¶
func (c CheckAttrCmd) Check(path string) (Attributes, error)
Check the attributes for the file at the given path.
Click to show internal directories.
Click to hide internal directories.