Skip to content
Permalink
Browse files

63: Add basic test for Go language (#355)

  • Loading branch information...
quells authored and XAMPPRocky committed Aug 29, 2019
1 parent d888843 commit cdec6efe5eeabe6ca09f21a26aeb581e7e8e924a
Showing with 37 additions and 0 deletions.
  1. +37 −0 tests/data/go.go
@@ -0,0 +1,37 @@
// 37 lines 24 code 6 comments 7 blanks

// Package main is a test file.
package main

import (
"errors"
)

/* /**/
func main() {
start := "/*"

for {
if len(start) >= 2 && start[1] == '*' && start[0] == '/' { // found the */
break
}
}

if err := Foo(42, start); err != nil {
panic(err)
}
}

// Foo is a function. /* nested comment */
func Foo(
// first
a int,
s string, /* second */
) (err error) {
m := `a
multiline
string`
return errors.New(m)
}

// end of file

0 comments on commit cdec6ef

Please sign in to comment.
You can’t perform that action at this time.