1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-15 17:50:49 +00:00

nfd-master: lint fixes

This commit is contained in:
Markus Lehtonen 2020-05-19 16:18:29 +03:00
parent 80becea590
commit 853609f721
2 changed files with 3 additions and 3 deletions

View file

@ -58,7 +58,7 @@ func TestUpdateNodeFeatures(t *testing.T) {
fakeAnnotations := map[string]string{"version": version.Get()}
fakeExtResources := ExtendedResources{"source-feature.1": "", "source-feature.2": ""}
fakeFeatureLabelNames := make([]string, 0, len(fakeFeatureLabels))
for k, _ := range fakeFeatureLabels {
for k := range fakeFeatureLabels {
fakeFeatureLabelNames = append(fakeFeatureLabelNames, k)
}
sort.Strings(fakeFeatureLabelNames)

View file

@ -105,7 +105,7 @@ func createStatusOp(verb string, resource string, path string, value string) sta
}
// Create new NfdMaster server instance.
func NewNfdMaster(args Args) (*nfdMaster, error) {
func NewNfdMaster(args Args) (NfdMaster, error) {
nfd := &nfdMaster{args: args, ready: make(chan bool, 1)}
// Check TLS related args
@ -191,7 +191,7 @@ func (m *nfdMaster) WaitForReady(timeout time.Duration) bool {
select {
case ready, ok := <-m.ready:
// Ready if the flag is true or the channel has been closed
if ready == true || ok == false {
if ready || !ok {
return true
}
case <-time.After(timeout):