mirror of
https://github.com/golang/go
synced 2024-11-22 07:14:40 -07:00
Don't bother to import "os" just so that we can call
os.Exit(0) at the end of main. R=rsc DELTA=6 (0 added, 6 deleted, 0 changed) OCL=28967 CL=28969
This commit is contained in:
parent
52b0f77bf9
commit
49fceff6af
@ -6,8 +6,6 @@
|
|||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "os"
|
|
||||||
|
|
||||||
type T chan uint64;
|
type T chan uint64;
|
||||||
|
|
||||||
func M(f uint64) (in, out T) {
|
func M(f uint64) (in, out T) {
|
||||||
@ -67,5 +65,4 @@ func main() {
|
|||||||
x = min(xs);
|
x = min(xs);
|
||||||
if x != OUT[i] { panic("bad: ", x, " should be ", OUT[i]); }
|
if x != OUT[i] { panic("bad: ", x, " should be ", OUT[i]); }
|
||||||
}
|
}
|
||||||
os.Exit(0);
|
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,6 @@
|
|||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "os"
|
|
||||||
|
|
||||||
// Send the sequence 2, 3, 4, ... to channel 'ch'.
|
// Send the sequence 2, 3, 4, ... to channel 'ch'.
|
||||||
func Generate(ch chan<- int) {
|
func Generate(ch chan<- int) {
|
||||||
for i := 2; ; i++ {
|
for i := 2; ; i++ {
|
||||||
@ -49,5 +47,4 @@ func main() {
|
|||||||
for i := 0; i < len(a); i++ {
|
for i := 0; i < len(a); i++ {
|
||||||
if x := <-primes; x != a[i] { panic(x, " != ", a[i]) }
|
if x := <-primes; x != a[i] { panic(x, " != ", a[i]) }
|
||||||
}
|
}
|
||||||
os.Exit(0);
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user