From 2ccd4e9f87662bb3bda4c8f23e3a0317fc189006 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 1 Feb 2013 09:08:25 -0800 Subject: [PATCH] sort: delete now-duplicate example, fix build R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/7220075 --- src/pkg/sort/example_reverse_test.go | 30 ---------------------------- 1 file changed, 30 deletions(-) delete mode 100644 src/pkg/sort/example_reverse_test.go diff --git a/src/pkg/sort/example_reverse_test.go b/src/pkg/sort/example_reverse_test.go deleted file mode 100644 index 7c7f05bf3a..0000000000 --- a/src/pkg/sort/example_reverse_test.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2011 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sort_test - -import ( - "fmt" - "sort" -) - -// Reverse embeds a sort.Interface value and implements a reverse sort over -// that value. -type Reverse struct { - // This embedded Interface permits Reverse to use the methods of - // another Interface implementation. - sort.Interface -} - -// Less returns the opposite of the embedded implementation's Less method. -func (r Reverse) Less(i, j int) bool { - return r.Interface.Less(j, i) -} - -func ExampleInterface_reverse() { - s := []int{5, 2, 6, 3, 1, 4} // unsorted - sort.Sort(Reverse{sort.IntSlice(s)}) - fmt.Println(s) - // Output: [6 5 4 3 2 1] -} -- 2.48.1