Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/denormal/go-gitignore
/ functions
Functions
153 in github.com/denormal/go-gitignore
⨍
Functions
153
◇
Types & classes
28
Method
Get
Set() Get attempts to retrieve an GitIgnore instance associated with the given path. If the path is not known nil is returned.
cache.go:48
Method
Ignore
compile() Ignore returns true if the pattern describes files or paths that should be ignored.
pattern.go:126
Method
Ignore
Relative() Ignore returns true if the path is ignored by this GitIgnore. Paths that are not matched by this GitIgnore are not ignored. Internally, Ign
gitignore.go:283
Method
Include
Include returns true if the pattern describes files or paths that should be included (i.e. not ignored)
pattern.go:130
Method
Include
Ignore() Include returns true if the path is included by this GitIgnore. Paths that are not matched by this GitIgnore are always included. Internally,
gitignore.go:296
Method
Match
NewRepositoryWithCache() Match attempts to match the path against this repository. Matching proceeds according to normal gitignore rules, where .gtign
repository.go:174
Method
Match
name() Match returns true if the given path matches the name pattern. If the pattern is meant for directories only, and the path is not a directory, M
pattern.go:153
Method
Match
path() Match returns true if the given path matches the path pattern. If the pattern is meant for directories only, and the path is not a directory, M
pattern.go:193
Method
Match
any() Match returns true if the given path matches the any pattern. If the pattern is meant for directories only, and the path is not a directory, Mat
pattern.go:233
Function
NewRepository
repository{} NewRepository returns a GitIgnore instance representing a git repository with root directory base. If base is not a directory, or base ca
repository.go:26
Method
Next
NewLexer() Next returns the next Token from the Lexer reader. If an error is encountered, it will be returned as an Error instance, detailing the erro
lexer.go:45
Method
Parse
NewParser() Parse returns all well-formed .gitignore Patterns contained within the parser stream. Parsing will terminate at the end of the stream, or
parser.go:45
Method
Position
NewError()
error.go:25
Method
Position
Position returns the position of the first token of this pattern.
pattern.go:133
Method
Set
Cache() Set stores the GitIgnore ignore against its path.
cache.go:30
Method
String
String returns the string representation of the pattern.
pattern.go:136
Method
String
Position() String returns the string representation of the current position of the Lexer.
lexer.go:134
Method
String
String() returns a concatenated string of all runes represented by the list of tokens.
tokenset.go:8
Method
String
String returns a string representation of the Token type.
tokentype.go:19
Function
TestCache
(t *testing.T)
cache_test.go:9
Function
TestIgnore
TestMatch()
match_test.go:95
Function
TestInclude
TestIgnore()
match_test.go:152
Function
TestInvalidRepository
TestRepositoryWithCache()
repository_test.go:221
Function
TestInvalidRepositoryWithCache
TestInvalidRepositoryWithErrorsFalse()
repository_test.go:276
Function
TestInvalidRepositoryWithErrors
TestInvalidRepositoryWithFile()
repository_test.go:242
Function
TestInvalidRepositoryWithErrorsFalse
TestInvalidRepositoryWithErrors()
repository_test.go:259
Function
TestInvalidRepositoryWithFile
TestInvalidRepository()
repository_test.go:231
Function
TestLexerCarriageReturn
TestLexerNewLine() TestLexerCarriageReturn tests the behavour of the gitignore.Lexer when the input data explicitly uses "\r\n" as the line separator
lexer_test.go:32
Function
TestLexerInvalidCarriageReturn
TestLexerInvalidNewLine()
lexer_test.go:51
Function
TestLexerInvalidNewLine
TestLexerCarriageReturn()
lexer_test.go:44
Function
TestLexerNewLine
TestLexerNewLne tests the behavour of the gitignore.Lexer when the input data explicitly uses "\n" as the line separator
lexer_test.go:13
Function
TestMatch
(t *testing.T)
match_test.go:11
Function
TestMatchAbsolute
TestInclude()
match_test.go:209
Function
TestMatchRelative
TestMatchAbsolute()
match_test.go:261
Function
TestNew
TestNewWithCache()
gitignore_test.go:154
Function
TestNewFromEmptyFile
TestNewFromWhitespaceFile()
gitignore_test.go:40
Function
TestNewFromFile
gitignoretest{}
gitignore_test.go:20
Function
TestNewFromWhitespaceFile
TestNewFromFile()
gitignore_test.go:30
Function
TestNewWithCache
TestNewWithErrors()
gitignore_test.go:86
Function
TestNewWithErrors
TestNewFromEmptyFile()
gitignore_test.go:50
Function
TestParser
parsetest{} TestParser tests the behaviour of gitignore.Parser
parser_test.go:19
Function
TestParserError
TestParser() TestParserError tests the behaviour of the gitignore.Parser with an error handler that returns false on receiving an error
parser_test.go:35
Function
TestParserInvalid
TestParserError()
parser_test.go:50
Function
TestParserInvalidFalse
TestParserInvalid()
parser_test.go:65
Function
TestPosition
(t *testing.T)
position_test.go:8
Function
TestRepository
invalidtest{}
repository_test.go:97
Function
TestRepositoryWithCache
TestRepositoryWithErrorsFalse()
repository_test.go:168
Function
TestRepositoryWithErrors
TestRepositoryWithFile()
repository_test.go:126
Function
TestRepositoryWithErrorsFalse
TestRepositoryWithErrors()
repository_test.go:147
Function
TestRepositoryWithFile
TestRepository()
repository_test.go:111
Function
TestToken
(t *testing.T)
token_test.go:10
Method
Underlying
()
error.go:27
Function
exclude
dir()
util_test.go:118
← previous
101–153 of 153, ranked by callers