dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

multiline_struct.go (940B)


      1 func _() {
      2 	testCase{char59 + "a." + char63 + "." + char63 + "." +
      3 		char63 + ".com",
      4 		false}
      5 
      6 	foo := Bar{
      7 		{
      8 			Index:   int(index),
      9 			MTU:     int(row.Mtu),
     10 			DEFAULT: 123,
     11 			CASE:    123,
     12 		},
     13 		{
     14 			Index: int(index),
     15 			MTU:   int(row.Mtu),
     16 		},
     17 	}
     18 
     19 	ifi := Interface{
     20 		Index:        int(index),
     21 		MTU:          int(row.Mtu),
     22 		Name:         name,
     23 		HardwareAddr: HardwareAddr(row.PhysAddr[:row.PhysAddrLen]),
     24 		Flags:        flags}
     25 	ift = append(ift, ifi)
     26 
     27 	Interface{
     28 		{"230-Anonymous access granted, restrictions apply\n" +
     29 			"Read the file README.txt,\n" +
     30 			"230  please",
     31 			23,
     32 			230,
     33 			"Anonymous access granted, restrictions apply\nRead the file README.txt,\n please"},
     34 	}
     35 
     36 	var _ struct {
     37 		foo, // super
     38 		bar, // important
     39 		baz int //comments
     40 	}
     41 
     42 	Cool(Foo{
     43 		Bar: Cool(Baz{
     44 			Blah: 123,
     45 		}),
     46 	})
     47 
     48 	Foo{{
     49 		1,
     50 	}, {
     51 		2,
     52 	}}
     53 
     54 	var Foo = Bar{
     55 		Baz: (&Blah{
     56 			One: 1,
     57 		}).Banana,
     58 	}
     59 
     60 	Foo{
     61 		1}.Bar(
     62 		1)
     63 }