Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
363f321f
Commit
363f321f
authored
Mar 06, 2017
by
yupengzte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...)
Signed-off-by:
yupengzte
<
yu.peng36@zte.com.cn
>
parent
df70b30e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
5 deletions
+4
-5
mesos.go
pkg/cloudprovider/providers/mesos/mesos.go
+1
-1
iscsi_util.go
pkg/volume/iscsi/iscsi_util.go
+1
-1
kubectl.go
test/e2e/kubectl.go
+1
-2
conformance.go
test/e2e_node/environment/conformance.go
+1
-1
No files found.
pkg/cloudprovider/providers/mesos/mesos.go
View file @
363f321f
...
@@ -169,7 +169,7 @@ func (c *MesosCloud) Master(clusterName string) (string, error) {
...
@@ -169,7 +169,7 @@ func (c *MesosCloud) Master(clusterName string) (string, error) {
return
host
,
nil
return
host
,
nil
}
}
}
}
return
""
,
errors
.
New
(
fmt
.
Sprintf
(
"The supplied cluster '%v' does not exist"
,
clusterName
)
)
return
""
,
fmt
.
Errorf
(
"The supplied cluster '%v' does not exist"
,
clusterName
)
}
}
// ipAddress returns an IP address of the specified instance.
// ipAddress returns an IP address of the specified instance.
...
...
pkg/volume/iscsi/iscsi_util.go
View file @
363f321f
...
@@ -125,7 +125,7 @@ func (util *ISCSIUtil) AttachDisk(b iscsiDiskMounter) error {
...
@@ -125,7 +125,7 @@ func (util *ISCSIUtil) AttachDisk(b iscsiDiskMounter) error {
if
iscsiTransport
==
""
{
if
iscsiTransport
==
""
{
glog
.
Errorf
(
"iscsi: could not find transport name in iface %s"
,
b
.
iface
)
glog
.
Errorf
(
"iscsi: could not find transport name in iface %s"
,
b
.
iface
)
return
errors
.
New
(
fmt
.
Sprintf
(
"Could not parse iface file for %s"
,
b
.
iface
)
)
return
fmt
.
Errorf
(
"Could not parse iface file for %s"
,
b
.
iface
)
}
else
if
iscsiTransport
==
"tcp"
{
}
else
if
iscsiTransport
==
"tcp"
{
devicePath
=
strings
.
Join
([]
string
{
"/dev/disk/by-path/ip"
,
tp
,
"iscsi"
,
b
.
iqn
,
"lun"
,
b
.
lun
},
"-"
)
devicePath
=
strings
.
Join
([]
string
{
"/dev/disk/by-path/ip"
,
tp
,
"iscsi"
,
b
.
iqn
,
"lun"
,
b
.
lun
},
"-"
)
}
else
{
}
else
{
...
...
test/e2e/kubectl.go
View file @
363f321f
...
@@ -20,7 +20,6 @@ import (
...
@@ -20,7 +20,6 @@ import (
"bytes"
"bytes"
"context"
"context"
"encoding/json"
"encoding/json"
"errors"
"fmt"
"fmt"
"io"
"io"
"io/ioutil"
"io/ioutil"
...
@@ -1837,7 +1836,7 @@ func getUDData(jpgExpected string, ns string) func(clientset.Interface, string)
...
@@ -1837,7 +1836,7 @@ func getUDData(jpgExpected string, ns string) func(clientset.Interface, string)
if
strings
.
Contains
(
data
.
Image
,
jpgExpected
)
{
if
strings
.
Contains
(
data
.
Image
,
jpgExpected
)
{
return
nil
return
nil
}
else
{
}
else
{
return
errors
.
New
(
fmt
.
Sprintf
(
"data served up in container is inaccurate, %s didn't contain %s"
,
data
,
jpgExpected
)
)
return
fmt
.
Errorf
(
"data served up in container is inaccurate, %s didn't contain %s"
,
data
,
jpgExpected
)
}
}
}
}
}
}
...
...
test/e2e_node/environment/conformance.go
View file @
363f321f
...
@@ -82,7 +82,7 @@ func check(options ...string) []error {
...
@@ -82,7 +82,7 @@ func check(options ...string) []error {
errs
=
appendNotNil
(
errs
,
kernel
())
errs
=
appendNotNil
(
errs
,
kernel
())
default
:
default
:
fmt
.
Printf
(
"Unrecognized option %s"
,
c
)
fmt
.
Printf
(
"Unrecognized option %s"
,
c
)
errs
=
append
(
errs
,
errors
.
New
(
fmt
.
Sprintf
(
"Unrecognized option %s"
,
c
)
))
errs
=
append
(
errs
,
fmt
.
Errorf
(
"Unrecognized option %s"
,
c
))
}
}
}
}
return
errs
return
errs
...
...
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