@@ -326,8 +326,8 @@ func ExampleQuery_Append() {
326326 // 5
327327}
328328
329- //The following code example demonstrates how to use Average
330- //to calculate the average of a slice of values.
329+ // The following code example demonstrates how to use Average
330+ // to calculate the average of a slice of values.
331331func ExampleQuery_Average () {
332332 grades := []int {78 , 92 , 100 , 37 , 81 }
333333 average := From (grades ).Average ()
@@ -360,8 +360,8 @@ func ExampleQuery_Contains() {
360360 // Does the slice contains 5? true
361361}
362362
363- //The following code example demonstrates how to use CountWith
364- //to count the even numbers in an array.
363+ // The following code example demonstrates how to use CountWith
364+ // to count the even numbers in an array.
365365func ExampleQuery_CountWith () {
366366 slice := []int {0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 }
367367
@@ -445,8 +445,8 @@ func ExampleQuery_DefaultIfEmpty() {
445445
446446}
447447
448- //The following code example demonstrates how to use Distinct
449- //to return distinct elements from a slice of integers.
448+ // The following code example demonstrates how to use Distinct
449+ // to return distinct elements from a slice of integers.
450450func ExampleQuery_Distinct () {
451451 ages := []int {21 , 46 , 46 , 55 , 17 , 21 , 55 , 55 }
452452
@@ -567,7 +567,7 @@ func ExampleQuery_First() {
567567
568568}
569569
570- //The following code example demonstrates how to use FirstWith
570+ // The following code example demonstrates how to use FirstWith
571571// to return the first element of an array that satisfies a condition.
572572func ExampleQuery_FirstWith () {
573573 numbers := []int {9 , 34 , 65 , 92 , 87 , 435 , 3 , 54 , 83 , 23 , 87 , 435 , 67 , 12 , 19 }
@@ -583,8 +583,8 @@ func ExampleQuery_FirstWith() {
583583
584584}
585585
586- //The following code example demonstrates how to use Intersect
587- //to return the elements that appear in each of two slices of integers.
586+ // The following code example demonstrates how to use Intersect
587+ // to return the elements that appear in each of two slices of integers.
588588func ExampleQuery_Intersect () {
589589 id1 := []int {44 , 26 , 92 , 30 , 71 , 38 }
590590 id2 := []int {39 , 59 , 83 , 47 , 26 , 4 , 30 }
@@ -603,8 +603,8 @@ func ExampleQuery_Intersect() {
603603
604604}
605605
606- //The following code example demonstrates how to use IntersectBy
607- //to return the elements that appear in each of two slices of products with same Code.
606+ // The following code example demonstrates how to use IntersectBy
607+ // to return the elements that appear in each of two slices of products with same Code.
608608func ExampleQuery_IntersectBy () {
609609 type Product struct {
610610 Name string
@@ -716,10 +716,10 @@ func ExampleQuery_OrderByDescending() {
716716// The following code example demonstrates how to use ThenByDescending to perform
717717// a secondary ordering of the elements in a slice in descending order.
718718func ExampleOrderedQuery_ThenByDescending () {
719- fruits := []string {"apPLe" , "baNanA" , "apple" , "APple" , "orange" , "BAnana" , "ORANGE" , "apPLE" }
719+ fruits := []string {"apPLe" , "baNanA" , "apple" , "APple" , "orange" , "BAnana" , "ORANGE" }
720720
721721 // Sort the strings first ascending by their length and
722- // then descending using a custom case insensitive comparer.
722+ // then descending using a custom case- insensitive comparer.
723723 var query []string
724724 From (fruits ).
725725 OrderBy (
@@ -728,21 +728,22 @@ func ExampleOrderedQuery_ThenByDescending() {
728728 ThenByDescending (
729729 func (fruit interface {}) interface {} { return fruit .(string )[0 ] },
730730 ).
731+ ThenByDescending (
732+ func (fruit interface {}) interface {} { return fruit .(string )[3 ] },
733+ ).
731734 ToSlice (& query )
732735
733736 for _ , fruit := range query {
734737 fmt .Println (fruit )
735738 }
736739 // Output:
737- // apPLe
738- // apPLE
739740 // apple
741+ // apPLe
740742 // APple
741743 // orange
742744 // baNanA
743745 // ORANGE
744746 // BAnana
745-
746747}
747748
748749// The following code example demonstrates how to use Concat
@@ -1281,7 +1282,7 @@ func ExampleQuery_SumUInts() {
12811282}
12821283
12831284// The following code example demonstrates how to use Take
1284- // to return elements from the start of a slice.
1285+ // to return elements from the start of a slice.
12851286func ExampleQuery_Take () {
12861287 grades := []int {59 , 82 , 70 , 56 , 92 , 98 , 85 }
12871288
@@ -1910,7 +1911,7 @@ func ExampleQuery_GroupByT() {
19101911}
19111912
19121913// The following code example demonstrates how to use GroupJoinT
1913- // to perform a grouped join on two slices.
1914+ // to perform a grouped join on two slices.
19141915func ExampleQuery_GroupJoinT () {
19151916
19161917 type Person struct {
@@ -2405,7 +2406,7 @@ func ExampleQuery_SelectManyByIndexedT() {
24052406
24062407}
24072408
2408- //The following code example demonstrates how to use SingleWithT
2409+ // The following code example demonstrates how to use SingleWithT
24092410// to select the only element of a slice that satisfies a condition.
24102411func ExampleQuery_SingleWithT () {
24112412 fruits := []string {"apple" , "banana" , "mango" , "orange" , "passionfruit" , "grape" }
0 commit comments