This website works better with JavaScript.
Explore
Register
Sign In
kernel
/
git
mirror of
https://git.kernel.org/pub/scm/git/git.git
Watch
1
Star
0
Fork
You've already forked git
0
Code
Releases
Activity
60040
Commits
6
Branches
36
Tags
131 MiB
Tree:
59f0d5073f
git
/
t
/
t4018
/
golang-func
5 lines
40 B
Raw
Normal View
History
Unescape
Escape
userdiff: add built-in pattern for golang This adds xfuncname and word_regex patterns for golang, a quite popular programming language. It also includes test cases for the xfuncname regex (t4018) and updated documentation. The xfuncname regex finds functions, structs and interfaces. Although the Go language prohibits the opening brace from being on its own line, the regex does not makes it mandatory, to be able to match `func` statements like this: func foo(bar int, baz int) { } This is covered by the test case t4018/golang-long-func. The word_regex pattern finds identifiers, integers, floats, complex numbers and operators, according to the go specification. Signed-off-by: Alban Gruin <alban.gruin@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years ago
func RIGHT() {
a := 5
b := ChangeMe
}