Warning, /frameworks/syntax-highlighting/autotests/input/test.go is written in an unsupported language. File is not indexed.

0001 package main
0002 
0003 import (
0004         "fmt"//TODO remove after testing
0005         "math"
0006         "time"
0007 )
0008 
0009 type inter interface {
0010         Function(int) int
0011 }
0012 
0013 type myStruct struct {
0014         i int
0015         f float64
0016         neighbors map[string]*uint
0017         comID uint
0018 }
0019 
0020 func co() {
0021         fmt.Println("Go")
0022 }
0023 
0024 func co2(c chan float64) {
0025         c <- 13.37
0026         close(c)
0027 }
0028 
0029 func main() {
0030         defer fmt.Println("Hello KDE!")
0031         value := math.Log2(256)
0032         fmt.Printf("%.1f\n", value)
0033         var mybool bool
0034         mybool = true
0035         if mybool {
0036                 mybool = false
0037         } else {
0038                 panic("No!")//NOTICE
0039         }
0040         go co()
0041         m:= make(map[string]string)
0042         m["1"] = "2"/*Multi
0043         liner*/
0044         for k, v := range m {
0045                 m[v] = k
0046         }
0047         switch m["2"] {
0048                 case "1":
0049                         mybool = true
0050                 default:
0051                         return
0052         }
0053         ch := make(chan float64)
0054         go co2(ch)
0055         time.Sleep(100*time.Millisecond)
0056         select {
0057                 case <-ch:
0058                         fmt.Println("DONE")
0059                 default:
0060                         return
0061         }
0062 }
0063 
0064 var s string = "A string with \x60 a horse \140 \u2014 \U0001F40E"
0065 var s string = "A string with \x6 a horse \400 \u201 \U0001F40"
0066 var s string = "A string with \x6x a horse \400x \u201x \U0001F40x"
0067 var c float32 = imag(987i) + 0o_7_7_7 + 0x1.fp-2 + 0b101010 01 0o21 0x1
0068 var c float32 = imag(0x_987i) + 0o_7_7_7i + 0x1.fp-2i 0b101010 023__
0069 type R[T any, C comparable] struct { a T; b C }