Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.1
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
go /
test /
[ HOME SHELL ]
Name
Size
Permission
Action
alias3.dir
[ DIR ]
drwxr-xr-x
bench
[ DIR ]
drwxr-xr-x
chan
[ DIR ]
drwxr-xr-x
closure3.dir
[ DIR ]
drwxr-xr-x
codegen
[ DIR ]
drwxr-xr-x
ddd2.dir
[ DIR ]
drwxr-xr-x
dwarf
[ DIR ]
drwxr-xr-x
fixedbugs
[ DIR ]
drwxr-xr-x
import2.dir
[ DIR ]
drwxr-xr-x
import4.dir
[ DIR ]
drwxr-xr-x
interface
[ DIR ]
drwxr-xr-x
intrinsic.dir
[ DIR ]
drwxr-xr-x
ken
[ DIR ]
drwxr-xr-x
linkname.dir
[ DIR ]
drwxr-xr-x
method4.dir
[ DIR ]
drwxr-xr-x
oldescape_linkname.dir
[ DIR ]
drwxr-xr-x
retjmp.dir
[ DIR ]
drwxr-xr-x
runtime
[ DIR ]
drwxr-xr-x
stress
[ DIR ]
drwxr-xr-x
syntax
[ DIR ]
drwxr-xr-x
uintptrescapes.dir
[ DIR ]
drwxr-xr-x
235.go
1.56
KB
-rw-r--r--
64bit.go
24.83
KB
-rw-r--r--
README.md
577
B
-rw-r--r--
alg.go
822
B
-rw-r--r--
alias.go
588
B
-rw-r--r--
alias1.go
803
B
-rw-r--r--
alias2.go
2.52
KB
-rw-r--r--
alias3.go
187
B
-rw-r--r--
align.go
603
B
-rw-r--r--
append.go
9.09
KB
-rw-r--r--
append1.go
665
B
-rw-r--r--
args.go
374
B
-rw-r--r--
armimm.go
3.85
KB
-rw-r--r--
assign.go
975
B
-rw-r--r--
assign1.go
5.55
KB
-rw-r--r--
atomicload.go
798
B
-rw-r--r--
bigalg.go
2.12
KB
-rw-r--r--
bigmap.go
2.46
KB
-rw-r--r--
blank.go
2.1
KB
-rw-r--r--
blank1.go
703
B
-rw-r--r--
bom.go
406
B
-rw-r--r--
bombad.go
480
B
-rw-r--r--
bounds.go
5.65
KB
-rw-r--r--
chancap.go
1.57
KB
-rw-r--r--
chanlinear.go
2.12
KB
-rw-r--r--
char_lit.go
657
B
-rw-r--r--
char_lit1.go
813
B
-rw-r--r--
checkbce.go
3.56
KB
-rw-r--r--
clearfat.go
1.15
KB
-rw-r--r--
closedchan.go
5.79
KB
-rw-r--r--
closure.go
1.69
KB
-rw-r--r--
closure1.go
280
B
-rw-r--r--
closure2.go
1.69
KB
-rw-r--r--
closure3.go
295
B
-rw-r--r--
closure4.go
364
B
-rw-r--r--
cmp.go
7.63
KB
-rw-r--r--
cmp6.go
2.09
KB
-rw-r--r--
cmplx.go
1.39
KB
-rw-r--r--
cmplxdivide.c
2.05
KB
-rw-r--r--
cmplxdivide.go
868
B
-rw-r--r--
cmplxdivide1.go
240.68
KB
-rw-r--r--
complit.go
1.71
KB
-rw-r--r--
complit1.go
1.48
KB
-rw-r--r--
compos.go
403
B
-rw-r--r--
const.go
4.78
KB
-rw-r--r--
const1.go
3.39
KB
-rw-r--r--
const2.go
605
B
-rw-r--r--
const3.go
659
B
-rw-r--r--
const4.go
1.28
KB
-rw-r--r--
const5.go
835
B
-rw-r--r--
const6.go
834
B
-rw-r--r--
convT2X.go
3.33
KB
-rw-r--r--
convert.go
833
B
-rw-r--r--
convert1.go
3.41
KB
-rw-r--r--
convert2.go
5.05
KB
-rw-r--r--
convert3.go
544
B
-rw-r--r--
convlit.go
2.25
KB
-rw-r--r--
convlit1.go
458
B
-rw-r--r--
copy.go
6.6
KB
-rw-r--r--
copy1.go
763
B
-rw-r--r--
crlf.go
782
B
-rw-r--r--
ddd.go
4.23
KB
-rw-r--r--
ddd1.go
1.56
KB
-rw-r--r--
ddd2.go
252
B
-rw-r--r--
decl.go
926
B
-rw-r--r--
declbad.go
1.4
KB
-rw-r--r--
defer.go
875
B
-rw-r--r--
defererrcheck.go
1.53
KB
-rw-r--r--
deferfin.go
1.12
KB
-rw-r--r--
defernil.go
563
B
-rw-r--r--
deferprint.go
586
B
-rw-r--r--
deferprint.out
126
B
-rw-r--r--
devirt.go
599
B
-rw-r--r--
divide.go
1.22
KB
-rw-r--r--
divmod.go
9.28
KB
-rw-r--r--
empty.go
316
B
-rw-r--r--
env.go
585
B
-rw-r--r--
eof.go
308
B
-rw-r--r--
eof1.go
333
B
-rw-r--r--
escape.go
3.79
KB
-rw-r--r--
escape2.go
35.16
KB
-rw-r--r--
escape2n.go
35.19
KB
-rw-r--r--
escape3.go
524
B
-rw-r--r--
escape4.go
1.3
KB
-rw-r--r--
escape5.go
4.92
KB
-rw-r--r--
escape_array.go
3.64
KB
-rw-r--r--
escape_calls.go
1.26
KB
-rw-r--r--
escape_closure.go
3.94
KB
-rw-r--r--
escape_field.go
2.93
KB
-rw-r--r--
escape_goto.go
674
B
-rw-r--r--
escape_hash_maphash.go
368
B
-rw-r--r--
escape_iface.go
4.51
KB
-rw-r--r--
escape_indir.go
3.39
KB
-rw-r--r--
escape_level.go
1.79
KB
-rw-r--r--
escape_map.go
2.76
KB
-rw-r--r--
escape_param.go
9.11
KB
-rw-r--r--
escape_runtime_atomic.go
874
B
-rw-r--r--
escape_selfassign.go
538
B
-rw-r--r--
escape_slice.go
3.49
KB
-rw-r--r--
escape_struct_param1.go
9.43
KB
-rw-r--r--
escape_struct_param2.go
9.46
KB
-rw-r--r--
escape_struct_return.go
1.04
KB
-rw-r--r--
escape_sync_atomic.go
943
B
-rw-r--r--
escape_unsafe.go
2.16
KB
-rw-r--r--
fibo.go
6.28
KB
-rw-r--r--
finprofiled.go
1.95
KB
-rw-r--r--
float_lit.go
3.95
KB
-rw-r--r--
float_lit2.go
7.88
KB
-rw-r--r--
float_lit3.go
1.78
KB
-rw-r--r--
floatcmp.go
3.03
KB
-rw-r--r--
for.go
844
B
-rw-r--r--
func.go
1.29
KB
-rw-r--r--
func1.go
434
B
-rw-r--r--
func2.go
578
B
-rw-r--r--
func3.go
505
B
-rw-r--r--
func4.go
409
B
-rw-r--r--
func5.go
1.49
KB
-rw-r--r--
func6.go
393
B
-rw-r--r--
func7.go
477
B
-rw-r--r--
func8.go
599
B
-rw-r--r--
funcdup.go
1.19
KB
-rw-r--r--
funcdup2.go
655
B
-rw-r--r--
gc.go
411
B
-rw-r--r--
gc1.go
303
B
-rw-r--r--
gc2.go
972
B
-rw-r--r--
gcgort.go
34.54
KB
-rw-r--r--
gcstring.go
872
B
-rw-r--r--
goprint.go
722
B
-rw-r--r--
goprint.out
65
B
-rw-r--r--
goto.go
8.39
KB
-rw-r--r--
heapsampling.go
9.53
KB
-rw-r--r--
helloworld.go
269
B
-rw-r--r--
helloworld.out
13
B
-rw-r--r--
if.go
1.36
KB
-rw-r--r--
import.go
425
B
-rw-r--r--
import1.go
633
B
-rw-r--r--
import2.go
247
B
-rw-r--r--
import4.go
310
B
-rw-r--r--
import5.go
722
B
-rw-r--r--
import6.go
1.38
KB
-rw-r--r--
index.go
6.42
KB
-rw-r--r--
index0.go
301
B
-rw-r--r--
index1.go
305
B
-rw-r--r--
index2.go
305
B
-rw-r--r--
indirect.go
1.39
KB
-rw-r--r--
indirect1.go
1.53
KB
-rw-r--r--
init.go
432
B
-rw-r--r--
init1.go
1.08
KB
-rw-r--r--
initcomma.go
1.22
KB
-rw-r--r--
initempty.go
604
B
-rw-r--r--
initialize.go
1.24
KB
-rw-r--r--
initializerr.go
1.04
KB
-rw-r--r--
initloop.go
387
B
-rw-r--r--
inline.go
4.33
KB
-rw-r--r--
inline_big.go
12.64
KB
-rw-r--r--
inline_caller.go
1.36
KB
-rw-r--r--
inline_callers.go
1.87
KB
-rw-r--r--
inline_literal.go
1.02
KB
-rw-r--r--
inline_math_bits_rotate.go
569
B
-rw-r--r--
inline_sync.go
1.63
KB
-rw-r--r--
inline_variadic.go
516
B
-rw-r--r--
int_lit.go
387
B
-rw-r--r--
intcvt.go
4.26
KB
-rw-r--r--
intrinsic.go
259
B
-rw-r--r--
intrinsic_atomic.go
791
B
-rw-r--r--
iota.go
1.59
KB
-rw-r--r--
label.go
1007
B
-rw-r--r--
label1.go
1.88
KB
-rw-r--r--
linkmain.go
236
B
-rw-r--r--
linkmain_run.go
1.71
KB
-rw-r--r--
linkname.go
456
B
-rw-r--r--
linkobj.go
3.17
KB
-rw-r--r--
linkx.go
741
B
-rw-r--r--
linkx_run.go
1.65
KB
-rw-r--r--
literal.go
4.99
KB
-rw-r--r--
literal2.go
2.22
KB
-rw-r--r--
live.go
17.83
KB
-rw-r--r--
live1.go
1.29
KB
-rw-r--r--
live2.go
963
B
-rw-r--r--
live_syscall.go
1.13
KB
-rw-r--r--
locklinear.go
3.56
KB
-rw-r--r--
loopbce.go
9.75
KB
-rw-r--r--
makechan.go
1.29
KB
-rw-r--r--
makemap.go
1.5
KB
-rw-r--r--
makenew.go
522
B
-rw-r--r--
mallocfin.go
1.18
KB
-rw-r--r--
map.go
14.91
KB
-rw-r--r--
map1.go
1.39
KB
-rw-r--r--
mapclear.go
1.49
KB
-rw-r--r--
maplinear.go
3.62
KB
-rw-r--r--
mergemul.go
3.16
KB
-rw-r--r--
method.go
5.24
KB
-rw-r--r--
method1.go
727
B
-rw-r--r--
method2.go
1.05
KB
-rw-r--r--
method3.go
570
B
-rw-r--r--
method4.go
230
B
-rw-r--r--
method5.go
6.73
KB
-rw-r--r--
method6.go
465
B
-rw-r--r--
method7.go
940
B
-rw-r--r--
named.go
4.61
KB
-rw-r--r--
named1.go
970
B
-rw-r--r--
nil.go
2.23
KB
-rw-r--r--
nilcheck.go
3.62
KB
-rw-r--r--
nilptr.go
3.06
KB
-rw-r--r--
nilptr2.go
3.6
KB
-rw-r--r--
nilptr3.go
5.56
KB
-rw-r--r--
nilptr4.go
428
B
-rw-r--r--
nilptr5.go
814
B
-rw-r--r--
nilptr5_aix.go
805
B
-rw-r--r--
nilptr5_wasm.go
812
B
-rw-r--r--
nilptr_aix.go
3.09
KB
-rw-r--r--
nosplit.go
10.51
KB
-rw-r--r--
notinheap.go
1.39
KB
-rw-r--r--
notinheap2.go
708
B
-rw-r--r--
notinheap3.go
1.24
KB
-rw-r--r--
nowritebarrier.go
1.2
KB
-rw-r--r--
nul1.go
1.23
KB
-rw-r--r--
opt_branchlikely.go
2.08
KB
-rw-r--r--
parentype.go
424
B
-rw-r--r--
peano.go
2.22
KB
-rw-r--r--
phiopt.go
1.68
KB
-rw-r--r--
print.go
1.56
KB
-rw-r--r--
print.out
247
B
-rw-r--r--
printbig.go
315
B
-rw-r--r--
printbig.out
41
B
-rw-r--r--
prove.go
17.74
KB
-rw-r--r--
range.go
8.14
KB
-rw-r--r--
recover.go
10.64
KB
-rw-r--r--
recover1.go
2.5
KB
-rw-r--r--
recover2.go
1.22
KB
-rw-r--r--
recover3.go
1.64
KB
-rw-r--r--
recover4.go
2.17
KB
-rw-r--r--
recover5.go
408
B
-rw-r--r--
reflectmethod1.go
578
B
-rw-r--r--
reflectmethod2.go
719
B
-rw-r--r--
reflectmethod3.go
651
B
-rw-r--r--
reflectmethod4.go
573
B
-rw-r--r--
rename.go
1.52
KB
-rw-r--r--
rename1.go
1.11
KB
-rw-r--r--
reorder.go
2.1
KB
-rw-r--r--
reorder2.go
7.22
KB
-rw-r--r--
retjmp.go
252
B
-rw-r--r--
return.go
32.69
KB
-rw-r--r--
rotate.go
3.27
KB
-rw-r--r--
rotate0.go
286
B
-rw-r--r--
rotate1.go
286
B
-rw-r--r--
rotate2.go
286
B
-rw-r--r--
rotate3.go
286
B
-rw-r--r--
run.go
46.86
KB
-rw-r--r--
rune.go
603
B
-rw-r--r--
runtime.go
602
B
-rw-r--r--
shift1.go
8.89
KB
-rw-r--r--
shift2.go
1.31
KB
-rw-r--r--
sieve.go
1
KB
-rw-r--r--
sigchld.go
365
B
-rw-r--r--
sigchld.out
17
B
-rw-r--r--
simassign.go
1.12
KB
-rw-r--r--
sinit.go
5.75
KB
-rw-r--r--
sinit_run.go
853
B
-rw-r--r--
sizeof.go
2.95
KB
-rw-r--r--
slice3.go
2.92
KB
-rw-r--r--
slice3err.go
4.48
KB
-rw-r--r--
slicecap.go
1.85
KB
-rw-r--r--
sliceopt.go
735
B
-rw-r--r--
solitaire.go
2.9
KB
-rw-r--r--
stack.go
1.69
KB
-rw-r--r--
stackobj.go
975
B
-rw-r--r--
stackobj2.go
1.55
KB
-rw-r--r--
stackobj3.go
1.42
KB
-rw-r--r--
strcopy.go
674
B
-rw-r--r--
strength.go
1.02
KB
-rw-r--r--
string_lit.go
3.58
KB
-rw-r--r--
stringrange.go
1.45
KB
-rw-r--r--
struct0.go
565
B
-rw-r--r--
switch.go
6.1
KB
-rw-r--r--
switch2.go
778
B
-rw-r--r--
switch3.go
1.19
KB
-rw-r--r--
switch4.go
526
B
-rw-r--r--
switch5.go
2.21
KB
-rw-r--r--
switch6.go
1.1
KB
-rw-r--r--
switch7.go
781
B
-rw-r--r--
tinyfin.go
1.57
KB
-rw-r--r--
torture.go
7.69
KB
-rw-r--r--
turing.go
893
B
-rw-r--r--
typecheck.go
386
B
-rw-r--r--
typecheckloop.go
486
B
-rw-r--r--
typeswitch.go
1.83
KB
-rw-r--r--
typeswitch1.go
1.6
KB
-rw-r--r--
typeswitch2.go
655
B
-rw-r--r--
typeswitch2b.go
598
B
-rw-r--r--
typeswitch3.go
964
B
-rw-r--r--
uintptrescapes.go
250
B
-rw-r--r--
uintptrescapes2.go
2.18
KB
-rw-r--r--
uintptrescapes3.go
1.28
KB
-rw-r--r--
undef.go
758
B
-rw-r--r--
utf.go
1.19
KB
-rw-r--r--
varerr.go
434
B
-rw-r--r--
varinit.go
509
B
-rw-r--r--
writebarrier.go
5.57
KB
-rw-r--r--
zerodivide.go
5.71
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : 64bit.go
// runoutput // Copyright 2009 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. // Generate test of 64-bit arithmetic. // Most synthesized routines have different cases for // constants vs variables and even the generated code has // different cases for large and small constants, // so try a good range of inputs. package main import ( "bufio" "fmt" "os" ) var bout *bufio.Writer // 64-bit math without using 64-bit numbers, // so that we can generate the test program even // if the compiler has buggy or missing 64-bit support. type Uint64 struct { hi uint32 lo uint32 } type Int64 struct { hi int32 lo uint32 } func (a Uint64) Int64() (c Int64) { c.hi = int32(a.hi) c.lo = a.lo return } func (a Uint64) Cmp(b Uint64) int { switch { case a.hi < b.hi: return -1 case a.hi > b.hi: return 1 case a.lo < b.lo: return -1 case a.lo > b.lo: return 1 } return 0 } func (a Uint64) LeftShift(b uint) (c Uint64) { switch { case b >= 64: c.hi = 0 c.lo = 0 case b >= 32: c.hi = a.lo << (b - 32) c.lo = 0 default: c.hi = a.hi<<b | a.lo>>(32-b) c.lo = a.lo << b } return } func (a Uint64) RightShift(b uint) (c Uint64) { switch { case b >= 64: c.hi = 0 c.lo = a.hi case b >= 32: c.hi = 0 c.lo = a.hi >> (b - 32) default: c.hi = a.hi >> b c.lo = a.hi<<(32-b) | a.lo>>b } return } func (a Uint64) LeftShift64(b Uint64) (c Uint64) { if b.hi != 0 || b.lo >= 64 { return } return a.LeftShift(uint(b.lo)) } func (a Uint64) RightShift64(b Uint64) (c Uint64) { if b.hi != 0 || b.lo >= 64 { return } return a.RightShift(uint(b.lo)) } func (a Uint64) Plus(b Uint64) (c Uint64) { var carry uint32 if c.lo = a.lo + b.lo; c.lo < a.lo { carry = 1 } c.hi = a.hi + b.hi + carry return } func (a Uint64) Minus(b Uint64) (c Uint64) { var borrow uint32 if c.lo = a.lo - b.lo; c.lo > a.lo { borrow = 1 } c.hi = a.hi - b.hi - borrow return } func (a Uint64) Neg() (c Uint64) { var zero Uint64 return zero.Minus(a) } func (a Uint64) Com() (c Uint64) { c.hi = ^a.hi c.lo = ^a.lo return } func (a Uint64) Len() int { switch { case a.hi != 0: for i := 31; i >= 0; i-- { if a.hi&(1<<uint(i)) != 0 { return i + 1 + 32 } } case a.lo != 0: for i := 31; i >= 0; i-- { if a.lo&(1<<uint(i)) != 0 { return i + 1 } } } return 0 } func (a Uint64) HasBit(b uint) bool { switch { case b >= 64: return false case b >= 32: return a.hi&(1<<(b-32)) != 0 } return a.lo&(1<<b) != 0 } func (a Uint64) Times(b Uint64) (c Uint64) { for i := uint(0); i < 64; i++ { if b.HasBit(i) { c = c.Plus(a.LeftShift(i)) } } return } func (a Uint64) DivMod(b Uint64) (quo, rem Uint64) { n := a.Len() - b.Len() if n >= 0 { b = b.LeftShift(uint(n)) for i := 0; i <= n; i++ { quo = quo.LeftShift(1) if b.Cmp(a) <= 0 { // b <= a quo.lo |= 1 a = a.Minus(b) } b = b.RightShift(1) } } rem = a return } func (a Uint64) And(b Uint64) (c Uint64) { c.hi = a.hi & b.hi c.lo = a.lo & b.lo return } func (a Uint64) AndNot(b Uint64) (c Uint64) { c.hi = a.hi &^ b.hi c.lo = a.lo &^ b.lo return } func (a Uint64) Or(b Uint64) (c Uint64) { c.hi = a.hi | b.hi c.lo = a.lo | b.lo return } func (a Uint64) Xor(b Uint64) (c Uint64) { c.hi = a.hi ^ b.hi c.lo = a.lo ^ b.lo return } func (a Uint64) String() string { return fmt.Sprintf("%#x%08x", a.hi, a.lo) } func (a Int64) Uint64() (c Uint64) { c.hi = uint32(a.hi) c.lo = a.lo return } func (a Int64) Cmp(b Int64) int { // Same body as Uint64.Cmp, // but behaves differently // because hi is uint32 not int32. switch { case a.hi < b.hi: return -1 case a.hi > b.hi: return 1 case a.lo < b.lo: return -1 case a.lo > b.lo: return 1 } return 0 } func (a Int64) LeftShift(b uint) (c Int64) { return a.Uint64().LeftShift(b).Int64() } func (a Int64) RightShift(b uint) (c Int64) { switch { case b >= 64: c.hi = a.hi >> 31 // sign extend c.lo = uint32(c.hi) case b >= 32: c.hi = a.hi >> 31 // sign extend c.lo = uint32(a.hi >> (b - 32)) default: c.hi = a.hi >> b c.lo = uint32(a.hi<<(32-b)) | a.lo>>b } return } func (a Int64) LeftShift64(b Uint64) (c Int64) { if b.hi != 0 || b.lo >= 64 { return } return a.LeftShift(uint(b.lo)) } func (a Int64) RightShift64(b Uint64) (c Int64) { if b.hi != 0 || b.lo >= 64 { return a.RightShift(64) } return a.RightShift(uint(b.lo)) } func (a Int64) Plus(b Int64) (c Int64) { return a.Uint64().Plus(b.Uint64()).Int64() } func (a Int64) Minus(b Int64) (c Int64) { return a.Uint64().Minus(b.Uint64()).Int64() } func (a Int64) Neg() (c Int64) { return a.Uint64().Neg().Int64() } func (a Int64) Com() (c Int64) { return a.Uint64().Com().Int64() } func (a Int64) Times(b Int64) (c Int64) { return a.Uint64().Times(b.Uint64()).Int64() } func (a Int64) DivMod(b Int64) (quo Int64, rem Int64) { var zero Int64 quoSign := +1 remSign := +1 if a.Cmp(zero) < 0 { quoSign = -1 remSign = -1 a = a.Neg() } if b.Cmp(zero) < 0 { quoSign = -quoSign b = b.Neg() } q, r := a.Uint64().DivMod(b.Uint64()) quo = q.Int64() rem = r.Int64() if quoSign < 0 { quo = quo.Neg() } if remSign < 0 { rem = rem.Neg() } return } func (a Int64) And(b Int64) (c Int64) { return a.Uint64().And(b.Uint64()).Int64() } func (a Int64) AndNot(b Int64) (c Int64) { return a.Uint64().AndNot(b.Uint64()).Int64() } func (a Int64) Or(b Int64) (c Int64) { return a.Uint64().Or(b.Uint64()).Int64() } func (a Int64) Xor(b Int64) (c Int64) { return a.Uint64().Xor(b.Uint64()).Int64() } func (a Int64) String() string { if a.hi < 0 { return fmt.Sprintf("-%s", a.Neg().Uint64()) } return a.Uint64().String() } var int64Values = []Int64{ Int64{0, 0}, Int64{0, 1}, Int64{0, 2}, Int64{0, 3}, Int64{0, 100}, Int64{0, 10001}, Int64{0, 1<<31 - 1}, Int64{0, 1 << 31}, Int64{0, 1<<31 + 1}, Int64{0, 1<<32 - 1<<30}, Int64{0, 1<<32 - 1}, Int64{1, 0}, Int64{1, 1}, Int64{2, 0}, Int64{1<<31 - 1, 1<<32 - 10000}, Int64{1<<31 - 1, 1<<32 - 1}, Int64{0x789abcde, 0xf0123456}, Int64{-1, 1<<32 - 1}, Int64{-1, 1<<32 - 2}, Int64{-1, 1<<32 - 3}, Int64{-1, 1<<32 - 100}, Int64{-1, 1<<32 - 10001}, Int64{-1, 1<<32 - (1<<31 - 1)}, Int64{-1, 1<<32 - 1<<31}, Int64{-1, 1<<32 - (1<<31 + 1)}, Int64{-1, 1<<32 - (1<<32 - 1<<30)}, Int64{-1, 0}, Int64{-1, 1}, Int64{-2, 0}, Int64{-(1 << 31), 10000}, Int64{-(1 << 31), 1}, Int64{-(1 << 31), 0}, Int64{-0x789abcde, 0xf0123456}, } var uint64Values = []Uint64{ Uint64{0, 0}, Uint64{0, 1}, Uint64{0, 2}, Uint64{0, 3}, Uint64{0, 100}, Uint64{0, 10001}, Uint64{0, 1<<31 - 1}, Uint64{0, 1 << 31}, Uint64{0, 1<<31 + 1}, Uint64{0, 1<<32 - 1<<30}, Uint64{0, 1<<32 - 1}, Uint64{1, 0}, Uint64{1, 1}, Uint64{2, 0}, Uint64{1<<31 - 1, 1<<32 - 10000}, Uint64{1<<31 - 1, 1<<32 - 1}, Uint64{1<<32 - 1<<30, 0}, Uint64{1<<32 - 1, 0}, Uint64{1<<32 - 1, 1<<32 - 100}, Uint64{1<<32 - 1, 1<<32 - 1}, Uint64{0x789abcde, 0xf0123456}, Uint64{0xfedcba98, 0x76543210}, } var shiftValues = []Uint64{ Uint64{0, 0}, Uint64{0, 1}, Uint64{0, 2}, Uint64{0, 3}, Uint64{0, 15}, Uint64{0, 16}, Uint64{0, 17}, Uint64{0, 31}, Uint64{0, 32}, Uint64{0, 33}, Uint64{0, 61}, Uint64{0, 62}, Uint64{0, 63}, Uint64{0, 64}, Uint64{0, 65}, Uint64{0, 1<<32 - 1}, Uint64{1, 0}, Uint64{1, 1}, Uint64{1 << 28, 0}, Uint64{1 << 31, 0}, Uint64{1<<32 - 1, 0}, Uint64{1<<32 - 1, 1<<32 - 1}, } var ntest = 0 // Part 1 is tests of variable operations; generic functions // called by repetitive code. Could make a table but not worth it. const prolog = "\n" + "package main\n" + "\n" + "import \"os\"\n" + "\n" + "var ok = true\n" + "\n" + "func testInt64Unary(a, plus, xor, minus int64) {\n" + " if n, op, want := +a, `+`, plus; n != want { ok=false; println(`int64`, op, a, `=`, n, `should be`, want); }\n" + " if n, op, want := ^a, `^`, xor; n != want { ok=false; println(`int64`, op, a, `=`, n, `should be`, want); }\n" + " if n, op, want := -a, `-`, minus; n != want { ok=false; println(`int64`, op, a, `=`, n, `should be`, want); }\n" + "}\n" + "\n" + "func testInt64Binary(a, b, add, sub, mul, div, mod, and, or, xor, andnot int64, dodiv bool) {\n" + " if n, op, want := a + b, `+`, add; n != want { ok=false; println(`int64`, a, op, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a - b, `-`, sub; n != want { ok=false; println(`int64`, a, op, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a * b, `*`, mul; n != want { ok=false; println(`int64`, a, op, b, `=`, n, `should be`, want); }\n" + " if dodiv {\n" + " if n, op, want := a / b, `/`, div; n != want { ok=false; println(`int64`, a, op, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a % b, `%`, mod; n != want { ok=false; println(`int64`, a, op, b, `=`, n, `should be`, want); }\n" + " }\n" + " if n, op, want := a & b, `&`, and; n != want { ok=false; println(`int64`, a, op, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a | b, `|`, or; n != want { ok=false; println(`int64`, a, op, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a ^ b, `^`, xor; n != want { ok=false; println(`int64`, a, op, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a &^ b, `&^`, andnot; n != want { ok=false; println(`int64`, a, op, b, `=`, n, `should be`, want); }\n" + "}\n" + "\n" + "func testInt64Shift(a int64, b uint64, left, right int64) {\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(`int64`, a, op, `uint64`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(`int64`, a, op, `uint64`, s, `=`, n, `should be`, want); }\n" + " if uint64(uint(b)) == b {\n" + " b := uint(b);\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(`int64`, a, op, `uint`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(`int64`, a, op, `uint`, s, `=`, n, `should be`, want); }\n" + " }\n" + " if uint64(uint32(b)) == b {\n" + " b := uint32(b);\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(`int64`, a, op, `uint32`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(`int64`, a, op, `uint32`, s, `=`, n, `should be`, want); }\n" + " }\n" + " if uint64(uint16(b)) == b {\n" + " b := uint16(b);\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(`int64`, a, op, `uint16`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(`int64`, a, op, `uint16`, s, `=`, n, `should be`, want); }\n" + " }\n" + " if uint64(uint8(b)) == b {\n" + " b := uint8(b);\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(`int64`, a, op, `uint8`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(`int64`, a, op, `uint8`, s, `=`, n, `should be`, want); }\n" + " }\n" + "}\n" + "\n" + "func testUint64Unary(a, plus, xor, minus uint64) {\n" + " if n, op, want := +a, `+`, plus; n != want { ok=false; println(`uint64`, op, a, `=`, n, `should be`, want); }\n" + " if n, op, want := ^a, `^`, xor; n != want { ok=false; println(`uint64`, op, a, `=`, n, `should be`, want); }\n" + " if n, op, want := -a, `-`, minus; n != want { ok=false; println(`uint64`, op, a, `=`, n, `should be`, want); }\n" + "}\n" + "\n" + "func testUint64Binary(a, b, add, sub, mul, div, mod, and, or, xor, andnot uint64, dodiv bool) {\n" + " if n, op, want := a + b, `+`, add; n != want { ok=false; println(`uint64`, a, op, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a - b, `-`, sub; n != want { ok=false; println(`uint64`, a, op, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a * b, `*`, mul; n != want { ok=false; println(`uint64`, a, op, b, `=`, n, `should be`, want); }\n" + " if dodiv {\n" + " if n, op, want := a / b, `/`, div; n != want { ok=false; println(`uint64`, a, op, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a % b, `%`, mod; n != want { ok=false; println(`uint64`, a, op, b, `=`, n, `should be`, want); }\n" + " }\n" + " if n, op, want := a & b, `&`, and; n != want { ok=false; println(`uint64`, a, op, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a | b, `|`, or; n != want { ok=false; println(`uint64`, a, op, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a ^ b, `^`, xor; n != want { ok=false; println(`uint64`, a, op, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a &^ b, `&^`, andnot; n != want { ok=false; println(`uint64`, a, op, b, `=`, n, `should be`, want); }\n" + "}\n" + "\n" + "func testUint64Shift(a, b, left, right uint64) {\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(`uint64`, a, op, `uint64`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(`uint64`, a, op, `uint64`, s, `=`, n, `should be`, want); }\n" + " if uint64(uint(b)) == b {\n" + " b := uint(b);\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(`uint64`, a, op, `uint`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(`uint64`, a, op, `uint`, s, `=`, n, `should be`, want); }\n" + " }\n" + " if uint64(uint32(b)) == b {\n" + " b := uint32(b);\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(`uint64`, a, op, `uint32`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(`uint64`, a, op, `uint32`, s, `=`, n, `should be`, want); }\n" + " }\n" + " if uint64(uint16(b)) == b {\n" + " b := uint16(b);\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(`uint64`, a, op, `uint16`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(`uint64`, a, op, `uint16`, s, `=`, n, `should be`, want); }\n" + " }\n" + " if uint64(uint8(b)) == b {\n" + " b := uint8(b);\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(`uint64`, a, op, `uint8`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(`uint64`, a, op, `uint8`, s, `=`, n, `should be`, want); }\n" + " }\n" + "}\n" + "\n" func varTests() { fmt.Fprint(bout, prolog) for _, a := range int64Values { fmt.Fprintf(bout, "func test%v() {\n", ntest) ntest++ fmt.Fprintf(bout, "\ttestInt64Unary(%v, %v, %v, %v);\n", a, a, a.Com(), a.Neg()) for _, b := range int64Values { var div, mod Int64 dodiv := false var zero Int64 if b.Cmp(zero) != 0 { // b != 0 // Can't divide by zero but also can't divide -0x8000...000 by -1. var bigneg = Int64{-0x80000000, 0} var minus1 = Int64{-1, ^uint32(0)} if a.Cmp(bigneg) != 0 || b.Cmp(minus1) != 0 { // a != -1<<63 || b != -1 div, mod = a.DivMod(b) dodiv = true } } fmt.Fprintf(bout, "\ttestInt64Binary(%v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v);\n", a, b, a.Plus(b), a.Minus(b), a.Times(b), div, mod, a.And(b), a.Or(b), a.Xor(b), a.AndNot(b), dodiv) } for _, b := range shiftValues { fmt.Fprintf(bout, "\ttestInt64Shift(%v, %v, %v, %v);\n", a, b, a.LeftShift64(b), a.RightShift64(b)) } fmt.Fprintf(bout, "}\n") } for _, a := range uint64Values { fmt.Fprintf(bout, "func test%v() {\n", ntest) ntest++ fmt.Fprintf(bout, "\ttestUint64Unary(%v, %v, %v, %v);\n", a, a, a.Com(), a.Neg()) for _, b := range uint64Values { var div, mod Uint64 dodiv := false var zero Uint64 if b.Cmp(zero) != 0 { // b != 0 div, mod = a.DivMod(b) dodiv = true } fmt.Fprintf(bout, "\ttestUint64Binary(%v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v);\n", a, b, a.Plus(b), a.Minus(b), a.Times(b), div, mod, a.And(b), a.Or(b), a.Xor(b), a.AndNot(b), dodiv) } for _, b := range shiftValues { fmt.Fprintf(bout, "\ttestUint64Shift(%v, %v, %v, %v);\n", a, b, a.LeftShift64(b), a.RightShift64(b)) } fmt.Fprintf(bout, "}\n") } } // Part 2 is tests of operations involving one variable and one constant. const binaryConstL = "func test%vBinaryL%v(b, add, sub, mul, div, mod, and, or, xor, andnot %v, dodiv bool) {\n" + " const a %v = %v;\n" + " const typ = `%s`;\n" + " if n, op, want := a + b, `+`, add; n != want { ok=false; println(typ, `const`, a, op, `var`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a - b, `-`, sub; n != want { ok=false; println(typ, `const`, a, op, `var`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a * b, `*`, mul; n != want { ok=false; println(typ, `const`, a, op, `var`, b, `=`, n, `should be`, want); }\n" + " if dodiv {\n" + " if n, op, want := a / b, `/`, div; n != want { ok=false; println(typ, `const`, a, op, `var`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a %% b, `%%`, mod; n != want { ok=false; println(typ, `const`, a, op, `var`, b, `=`, n, `should be`, want); }\n" + " }\n" + " if n, op, want := a & b, `&`, and; n != want { ok=false; println(typ, `const`, a, op, `var`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a | b, `|`, or; n != want { ok=false; println(typ, `const`, a, op, `var`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a ^ b, `^`, xor; n != want { ok=false; println(typ, `const`, a, op, `var`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a &^ b, `&^`, andnot; n != want { ok=false; println(typ, `const`, a, op, `var`, b, `=`, n, `should be`, want); }\n" + "}\n" + "\n" const binaryConstR = "func test%vBinaryR%v(a, add, sub, mul, div, mod, and, or, xor, andnot %v, dodiv bool) {\n" + " const b %v = %v;\n" + " const typ = `%s`;\n" + " if n, op, want := a + b, `+`, add; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a - b, `-`, sub; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a * b, `*`, mul; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " if dodiv {\n" + " if n, op, want := a / b, `/`, div; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a %% b, `%%`, mod; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " }\n" + " if n, op, want := a & b, `&`, and; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a | b, `|`, or; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a ^ b, `^`, xor; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a &^ b, `&^`, andnot; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + "}\n" + "\n" const binaryConstR0 = "func test%vBinaryR%v(a, add, sub, mul, div, mod, and, or, xor, andnot %v, dodiv bool) {\n" + " const b %v = %v;\n" + " const typ = `%s`;\n" + " if n, op, want := a + b, `+`, add; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a - b, `-`, sub; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a * b, `*`, mul; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a & b, `&`, and; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a | b, `|`, or; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a ^ b, `^`, xor; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + " if n, op, want := a &^ b, `&^`, andnot; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" + "}\n" + "\n" const shiftConstL = "func test%vShiftL%v(b uint64, left, right %v) {\n" + " const a %v = %v;\n" + " const typ = `%s`;\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(typ, `const`, a, op, `var`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(typ, `const`, a, op, `var`, s, `=`, n, `should be`, want); }\n" + " if uint64(uint32(b)) == b {\n" + " b := uint32(b);\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(typ, `const`, a, op, `var`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(typ, `const`, a, op, `var`, s, `=`, n, `should be`, want); }\n" + " }\n" + "}\n" const shiftConstR = "func test%vShiftR%v(a, left, right %v) {\n" + " const b uint64 = %v;\n" + " const typ = `%s`;\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(typ, `var`, a, op, `const`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(typ, `var`, a, op, `const`, s, `=`, n, `should be`, want); }\n" + " if b & 0xffffffff == b {\n" + " const b = uint32(b & 0xffffffff);\n" + " if n, op, s, want := a << b, `<<`, b, left; n != want { ok=false; println(typ, `var`, a, op, `const`, s, `=`, n, `should be`, want); }\n" + " if n, op, s, want := a >> b, `>>`, b, right; n != want { ok=false; println(typ, `var`, a, op, `const`, s, `=`, n, `should be`, want); }\n" + " }\n" + "}\n" func constTests() { for i, a := range int64Values { fmt.Fprintf(bout, binaryConstL, "Int64", i, "int64", "int64", a, "int64") if a.hi == 0 && a.lo == 0 { fmt.Fprintf(bout, binaryConstR0, "Int64", i, "int64", "int64", a, "int64") } else { fmt.Fprintf(bout, binaryConstR, "Int64", i, "int64", "int64", a, "int64") } fmt.Fprintf(bout, shiftConstL, "Int64", i, "int64", "int64", a, "int64") } for i, a := range uint64Values { fmt.Fprintf(bout, binaryConstL, "Uint64", i, "uint64", "uint64", a, "uint64") if a.hi == 0 && a.lo == 0 { fmt.Fprintf(bout, binaryConstR0, "Uint64", i, "uint64", "uint64", a, "uint64") } else { fmt.Fprintf(bout, binaryConstR, "Uint64", i, "uint64", "uint64", a, "uint64") } fmt.Fprintf(bout, shiftConstL, "Uint64", i, "uint64", "uint64", a, "uint64") } for i, a := range shiftValues { fmt.Fprintf(bout, shiftConstR, "Int64", i, "int64", a, "int64") fmt.Fprintf(bout, shiftConstR, "Uint64", i, "uint64", a, "uint64") } for i, a := range int64Values { fmt.Fprintf(bout, "func test%v() {\n", ntest) ntest++ for j, b := range int64Values { var div, mod Int64 dodiv := false var zero Int64 if b.Cmp(zero) != 0 { // b != 0 // Can't divide by zero but also can't divide -0x8000...000 by -1. var bigneg = Int64{-0x80000000, 0} var minus1 = Int64{-1, ^uint32(0)} if a.Cmp(bigneg) != 0 || b.Cmp(minus1) != 0 { // a != -1<<63 || b != -1 div, mod = a.DivMod(b) dodiv = true } } fmt.Fprintf(bout, "\ttestInt64BinaryL%v(%v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v);\n", i, b, a.Plus(b), a.Minus(b), a.Times(b), div, mod, a.And(b), a.Or(b), a.Xor(b), a.AndNot(b), dodiv) fmt.Fprintf(bout, "\ttestInt64BinaryR%v(%v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v);\n", j, a, a.Plus(b), a.Minus(b), a.Times(b), div, mod, a.And(b), a.Or(b), a.Xor(b), a.AndNot(b), dodiv) } for j, b := range shiftValues { fmt.Fprintf(bout, "\ttestInt64ShiftL%v(%v, %v, %v);\n", i, b, a.LeftShift64(b), a.RightShift64(b)) fmt.Fprintf(bout, "\ttestInt64ShiftR%v(%v, %v, %v);\n", j, a, a.LeftShift64(b), a.RightShift64(b)) } fmt.Fprintf(bout, "}\n") } for i, a := range uint64Values { fmt.Fprintf(bout, "func test%v() {\n", ntest) ntest++ for j, b := range uint64Values { var div, mod Uint64 dodiv := false var zero Uint64 if b.Cmp(zero) != 0 { // b != 0 div, mod = a.DivMod(b) dodiv = true } fmt.Fprintf(bout, "\ttestUint64BinaryL%v(%v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v);\n", i, b, a.Plus(b), a.Minus(b), a.Times(b), div, mod, a.And(b), a.Or(b), a.Xor(b), a.AndNot(b), dodiv) fmt.Fprintf(bout, "\ttestUint64BinaryR%v(%v, %v, %v, %v, %v, %v, %v, %v, %v, %v, %v);\n", j, a, a.Plus(b), a.Minus(b), a.Times(b), div, mod, a.And(b), a.Or(b), a.Xor(b), a.AndNot(b), dodiv) } for j, b := range shiftValues { fmt.Fprintf(bout, "\ttestUint64ShiftL%v(%v, %v, %v);\n", i, b, a.LeftShift64(b), a.RightShift64(b)) fmt.Fprintf(bout, "\ttestUint64ShiftR%v(%v, %v, %v);\n", j, a, a.LeftShift64(b), a.RightShift64(b)) } fmt.Fprintf(bout, "}\n") } } func main() { bout = bufio.NewWriter(os.Stdout) varTests() constTests() fmt.Fprintf(bout, "func main() {\n") for i := 0; i < ntest; i++ { fmt.Fprintf(bout, "\ttest%v();\n", i) } fmt.Fprintf(bout, "\tif !ok { os.Exit(1) }\n") fmt.Fprintf(bout, "}\n") bout.Flush() }
Close