Commit c9eb28d9 authored by Kirill Smelkov's avatar Kirill Smelkov

~staticcheck

parent df4b66e6
// Copyright (C) 2017 Nexedi SA and Contributors.
// Copyright (C) 2017-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -237,7 +237,7 @@ func parseGoStart(args string) (goStart, error) {
}
// double-check g is the same
g2, err := strconv.Atoi(argv[3])
g2, _ := strconv.Atoi(argv[3])
if g2 != gstart.g {
log.Print("found GoStart with different g")
return goStart{}, gStartArgvErr
......
// Copyright (C) 2018-2019 Nexedi SA and Contributors.
// Copyright (C) 2018-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -816,6 +816,9 @@ func tracegen1(P *Program, tpkg *Package, pkgdir string, kind string) error {
}{
timport,
traceExportHash(impPkg, "" /*regular package*/)})
if err != nil {
return err // XXX err ctx
}
text.emit("")
......
// Copyright (C) 2017 Nexedi SA and Contributors.
// Copyright (C) 2017-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -35,16 +35,6 @@ import (
"lab.nexedi.com/kirr/go123/exc"
)
func xglob(t *testing.T, pattern string) []string {
t.Helper()
matchv, err := filepath.Glob(pattern)
if err != nil {
t.Fatal(err)
}
return matchv
}
type TreePrepareMode int
const (
TreePrepareGolden TreePrepareMode = iota // prepare golden tree - how `gotrace gen` result should look like
......
// Copyright (C) 2018-2020 Nexedi SA and Contributors.
// Copyright (C) 2018-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -80,7 +80,7 @@ func TestLonetGoPy(t *testing.T) {
_, err = c1.Write([]byte("hello py")); X(err)
buf := make([]byte, 1024)
n, err := c1.Read(buf)
n, err := c1.Read(buf); X(err)
buf = buf[:n]
if want := "hello go"; string(buf) != want {
exc.Raisef("go<-py: got %q; want %q", buf, want)
......@@ -93,7 +93,7 @@ func TestLonetGoPy(t *testing.T) {
assert.Eq(c2.RemoteAddr(), xaddr("β:2"))
buf = make([]byte, 1024)
n, err = c2.Read(buf)
n, err = c2.Read(buf); X(err)
buf = buf[:n]
if want := "hello2 go"; string(buf) != want {
exc.Raisef("go<-py 2: got %q; want %q", buf, want)
......
// Copyright (C) 2017-2020 Nexedi SA and Contributors.
// Copyright (C) 2017-2021 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -148,7 +148,7 @@ func (n *Network) Host(name string) *virtnet.Host {
// down, but won't remove it from vnet .hostMap.
host = n.vnet.Host(name)
if host == nil {
panic(fmt.Sprintf("pipenet: NewHost said host already is there, but it was not found"))
panic("pipenet: NewHost said host already is there, but it was not found")
}
return host
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment