Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go123
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go123
Commits
c9eb28d9
Commit
c9eb28d9
authored
Sep 06, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~staticcheck
parent
df4b66e6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
21 deletions
+14
-21
cmd/gmigrate/gmigrate.go
cmd/gmigrate/gmigrate.go
+3
-3
tracing/cmd/gotrace/gotrace.go
tracing/cmd/gotrace/gotrace.go
+4
-1
tracing/cmd/gotrace/gotrace_test.go
tracing/cmd/gotrace/gotrace_test.go
+2
-12
xnet/lonet/lonet_test.go
xnet/lonet/lonet_test.go
+3
-3
xnet/pipenet/pipenet.go
xnet/pipenet/pipenet.go
+2
-2
No files found.
cmd/gmigrate/gmigrate.go
View file @
c9eb28d9
// Copyright (C) 2017 Nexedi SA and Contributors.
// Copyright (C) 2017
-2021
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
// Kirill Smelkov <kirr@nexedi.com>
//
//
// This program is free software: you can Use, Study, Modify and Redistribute
// This program is free software: you can Use, Study, Modify and Redistribute
...
@@ -237,7 +237,7 @@ func parseGoStart(args string) (goStart, error) {
...
@@ -237,7 +237,7 @@ func parseGoStart(args string) (goStart, error) {
}
}
// double-check g is the same
// double-check g is the same
g2
,
err
:=
strconv
.
Atoi
(
argv
[
3
])
g2
,
_
:=
strconv
.
Atoi
(
argv
[
3
])
if
g2
!=
gstart
.
g
{
if
g2
!=
gstart
.
g
{
log
.
Print
(
"found GoStart with different g"
)
log
.
Print
(
"found GoStart with different g"
)
return
goStart
{},
gStartArgvErr
return
goStart
{},
gStartArgvErr
...
...
tracing/cmd/gotrace/gotrace.go
View file @
c9eb28d9
// Copyright (C) 2018-20
19
Nexedi SA and Contributors.
// Copyright (C) 2018-20
21
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
// Kirill Smelkov <kirr@nexedi.com>
//
//
// This program is free software: you can Use, Study, Modify and Redistribute
// 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 {
...
@@ -816,6 +816,9 @@ func tracegen1(P *Program, tpkg *Package, pkgdir string, kind string) error {
}{
}{
timport
,
timport
,
traceExportHash
(
impPkg
,
""
/*regular package*/
)})
traceExportHash
(
impPkg
,
""
/*regular package*/
)})
if
err
!=
nil
{
return
err
// XXX err ctx
}
text
.
emit
(
""
)
text
.
emit
(
""
)
...
...
tracing/cmd/gotrace/gotrace_test.go
View file @
c9eb28d9
// Copyright (C) 2017 Nexedi SA and Contributors.
// Copyright (C) 2017
-2021
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
// Kirill Smelkov <kirr@nexedi.com>
//
//
// This program is free software: you can Use, Study, Modify and Redistribute
// This program is free software: you can Use, Study, Modify and Redistribute
...
@@ -35,16 +35,6 @@ import (
...
@@ -35,16 +35,6 @@ import (
"lab.nexedi.com/kirr/go123/exc"
"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
type
TreePrepareMode
int
const
(
const
(
TreePrepareGolden
TreePrepareMode
=
iota
// prepare golden tree - how `gotrace gen` result should look like
TreePrepareGolden
TreePrepareMode
=
iota
// prepare golden tree - how `gotrace gen` result should look like
...
...
xnet/lonet/lonet_test.go
View file @
c9eb28d9
// Copyright (C) 2018-202
0
Nexedi SA and Contributors.
// Copyright (C) 2018-202
1
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
// Kirill Smelkov <kirr@nexedi.com>
//
//
// This program is free software: you can Use, Study, Modify and Redistribute
// This program is free software: you can Use, Study, Modify and Redistribute
...
@@ -80,7 +80,7 @@ func TestLonetGoPy(t *testing.T) {
...
@@ -80,7 +80,7 @@ func TestLonetGoPy(t *testing.T) {
_
,
err
=
c1
.
Write
([]
byte
(
"hello py"
));
X
(
err
)
_
,
err
=
c1
.
Write
([]
byte
(
"hello py"
));
X
(
err
)
buf
:=
make
([]
byte
,
1024
)
buf
:=
make
([]
byte
,
1024
)
n
,
err
:=
c1
.
Read
(
buf
)
n
,
err
:=
c1
.
Read
(
buf
)
;
X
(
err
)
buf
=
buf
[
:
n
]
buf
=
buf
[
:
n
]
if
want
:=
"hello go"
;
string
(
buf
)
!=
want
{
if
want
:=
"hello go"
;
string
(
buf
)
!=
want
{
exc
.
Raisef
(
"go<-py: got %q; want %q"
,
buf
,
want
)
exc
.
Raisef
(
"go<-py: got %q; want %q"
,
buf
,
want
)
...
@@ -93,7 +93,7 @@ func TestLonetGoPy(t *testing.T) {
...
@@ -93,7 +93,7 @@ func TestLonetGoPy(t *testing.T) {
assert
.
Eq
(
c2
.
RemoteAddr
(),
xaddr
(
"β:2"
))
assert
.
Eq
(
c2
.
RemoteAddr
(),
xaddr
(
"β:2"
))
buf
=
make
([]
byte
,
1024
)
buf
=
make
([]
byte
,
1024
)
n
,
err
=
c2
.
Read
(
buf
)
n
,
err
=
c2
.
Read
(
buf
)
;
X
(
err
)
buf
=
buf
[
:
n
]
buf
=
buf
[
:
n
]
if
want
:=
"hello2 go"
;
string
(
buf
)
!=
want
{
if
want
:=
"hello2 go"
;
string
(
buf
)
!=
want
{
exc
.
Raisef
(
"go<-py 2: got %q; want %q"
,
buf
,
want
)
exc
.
Raisef
(
"go<-py 2: got %q; want %q"
,
buf
,
want
)
...
...
xnet/pipenet/pipenet.go
View file @
c9eb28d9
// Copyright (C) 2017-202
0
Nexedi SA and Contributors.
// Copyright (C) 2017-202
1
Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
// Kirill Smelkov <kirr@nexedi.com>
//
//
// This program is free software: you can Use, Study, Modify and Redistribute
// This program is free software: you can Use, Study, Modify and Redistribute
...
@@ -148,7 +148,7 @@ func (n *Network) Host(name string) *virtnet.Host {
...
@@ -148,7 +148,7 @@ func (n *Network) Host(name string) *virtnet.Host {
// down, but won't remove it from vnet .hostMap.
// down, but won't remove it from vnet .hostMap.
host
=
n
.
vnet
.
Host
(
name
)
host
=
n
.
vnet
.
Host
(
name
)
if
host
==
nil
{
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
return
host
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment