all: canonicalise generated code comments
MODIFY
cgo/level1doubleBench_auto_test.go
cgo/level1doubleBench_auto_test.go
+// Code generated by \"go run github.com/gonum/blas/testblas/benchautogen/autogen_bench_level1double.go\"; DO NOT EDIT.\n
+
// Copyright 2014 The Gonum Authors. All rights reserved.
// Use of this code is governed by a BSD-style
// license that can be found in the LICENSE file
-// This file is autogenerated by github.com/gonum/blas/testblas/benchautogen/autogen_bench_level1double.go
-
package cgo
import (

MODIFY
native/level1doubleBench_auto_test.go
native/level1doubleBench_auto_test.go
+// Code generated by \"go run github.com/gonum/blas/testblas/benchautogen/autogen_bench_level1double.go\"; DO NOT EDIT.\n
+
// Copyright 2014 The Gonum Authors. All rights reserved.
// Use of this code is governed by a BSD-style
// license that can be found in the LICENSE file
-// This file is autogenerated by github.com/gonum/blas/testblas/benchautogen/autogen_bench_level1double.go
-
package native
import (

MODIFY
native/single_precision.bash
native/single_precision.bash
@@ -11,7 +11,7 @@ WARNING='//\
# Level1 routines.
echo Generating level1single.go
-echo -e '// Generated code do not edit. Run `go generate`.\n' > level1single.go
+echo -e '// Code generated by "go generate github.com/gonum/blas/native"; DO NOT EDIT.\n' > level1single.go
cat level1double.go \
| gofmt -r 'blas.Float64Level1 -> blas.Float32Level1' \
\
@@ -33,7 +33,7 @@ cat level1double.go \
>> level1single.go
echo Generating level1single_sdot.go
-echo -e '// Generated code do not edit. Run `go generate`.\n' > level1single_sdot.go
+echo -e '// Code generated by "go generate github.com/gonum/blas/native"; DO NOT EDIT.\n' > level1single_sdot.go
cat level1double_ddot.go \
| gofmt -r 'float64 -> float32' \
\
@@ -46,7 +46,7 @@ cat level1double_ddot.go \
>> level1single_sdot.go
echo Generating level1single_dsdot.go
-echo -e '// Generated code do not edit. Run `go generate`.\n' > level1single_dsdot.go
+echo -e '// Code generated by "go generate github.com/gonum/blas/native"; DO NOT EDIT.\n' > level1single_dsdot.go
cat level1double_ddot.go \
| gofmt -r '[]float64 -> []float32' \
\
@@ -59,7 +59,7 @@ cat level1double_ddot.go \
>> level1single_dsdot.go
echo Generating level1single_sdsdot.go
-echo -e '// Generated code do not edit. Run `go generate`.\n' > level1single_sdsdot.go
+echo -e '// Code generated by "go generate github.com/gonum/blas/native"; DO NOT EDIT.\n' > level1single_sdsdot.go
cat level1double_ddot.go \
| gofmt -r 'float64 -> float32' \
\
@@ -77,7 +77,7 @@ cat level1double_ddot.go \
# Level2 routines.
echo Generating level2single.go
-echo -e '// Generated code do not edit. Run `go generate`.\n' > level2single.go
+echo -e '// Code generated by "go generate github.com/gonum/blas/native"; DO NOT EDIT.\n' > level2single.go
cat level2double.go \
| gofmt -r 'blas.Float64Level2 -> blas.Float32Level2' \
\
@@ -101,7 +101,7 @@ cat level2double.go \
# Level3 routines.
echo Generating level3single.go
-echo -e '// Generated code do not edit. Run `go generate`.\n' > level3single.go
+echo -e '// Code generated by "go generate github.com/gonum/blas/native"; DO NOT EDIT.\n' > level3single.go
cat level3double.go \
| gofmt -r 'blas.Float64Level3 -> blas.Float32Level3' \
\
@@ -116,7 +116,7 @@ cat level3double.go \
>> level3single.go
echo Generating general_single.go
-echo -e '// Generated code do not edit. Run `go generate`.\n' > general_single.go
+echo -e '// Code generated by "go generate github.com/gonum/blas/native"; DO NOT EDIT.\n' > general_single.go
cat general_double.go \
| gofmt -r 'float64 -> float32' \
\
@@ -129,7 +129,7 @@ cat general_double.go \
>> general_single.go
echo Generating sgemm.go
-echo -e '// Generated code do not edit. Run `go generate`.\n' > sgemm.go
+echo -e '// Code generated by "go generate github.com/gonum/blas/native"; DO NOT EDIT.\n' > sgemm.go
cat dgemm.go \
| gofmt -r 'float64 -> float32' \
| gofmt -r 'general64 -> general32' \

MODIFY
testblas/benchautogen/autogen_bench_level1double.go
testblas/benchautogen/autogen_bench_level1double.go
@@ -8,6 +8,8 @@ package main
import (
"fmt"
"os"
+ "os/exec"
+ "path"
"path/filepath"
"strconv"
)
@@ -18,7 +20,7 @@ var copyrightnotice = []byte(`// Copyright 2014 The Gonum Authors. All rights re
// Use of this code is governed by a BSD-style
// license that can be found in the LICENSE file`)
-var autogen = []byte(`// This file is autogenerated by github.com/gonum/blas/testblas/benchautogen/autogen_bench_level1double.go`)
+var autogen = []byte(`// Code generated by \"go run github.com/gonum/blas/testblas/benchautogen/autogen_bench_level1double.go\"; DO NOT EDIT.\n`)
var imports = []byte(`import(
"math/rand"
@@ -188,15 +190,21 @@ func main() {
fmt.Println(err)
os.Exit(1)
}
+
+ err = exec.Command("go", "fmt", path.Join("github.com", "gonum", "blas", pkg.name)).Run()
+ if err != nil {
+ fmt.Println(err)
+ os.Exit(1)
+ }
}
}
func printHeader(f *os.File, name string) error {
- if _, err := f.Write([]byte(copyrightnotice)); err != nil {
+ if _, err := f.Write(autogen); err != nil {
return err
}
f.WriteString("\n\n")
- f.Write(autogen)
+ f.Write(copyrightnotice)
f.WriteString("\n\n")
f.WriteString("package " + name)
f.WriteString("\n\n")

all: canonicalise generated code comments