1
// Copyright 2011 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
15
`Adapt code from sort.[Float64|Int|String]Array to sort.[Float64|Int|String]Slice.
17
http://codereview.appspot.com/4602054
18
http://codereview.appspot.com/4639041
24
func sortslice(f *ast.File) (fixed bool) {
25
if !imports(f, "sort") {
29
walk(f, func(n interface{}) {
30
s, ok := n.(*ast.SelectorExpr)
31
if !ok || !isTopName(s.X, "sort") {
35
switch s.Sel.String() {
37
s.Sel.Name = "Float64Slice"
39
s.Sel.Name = "IntSlice"
41
s.Sel.Name = "StringSlice"