Skip to content

Commit

Permalink
Add go report and fix part of reported errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Guo, Fei committed May 26, 2020
1 parent 4a0ae4b commit 66f4463
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# OpenYurt

[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
[![Go Report Card](https://goreportcard.com/badge/github.com/alibaba/openyurt)](https://goreportcard.com/report/github.com/alibaba/openyurt)

|![notification](img/bell-outline-badge.svg) What is NEW!|
|------------------|
Expand All @@ -11,10 +12,10 @@ In a nutshell, OpenYurt enables users to manage applications that run in the edg
in the cloud infrastructure.

OpenYurt is suitable for common edge computing use cases whose requirements include:
- minimizing the network traffic over long distances between the devices and the workloads.
- overcoming the network bandwidth or reliability limitations.
- processing data remotely to reduce latency.
- providing a better security model to handle sensitive data.
- Minimizing the network traffic over long distances between the devices and the workloads.
- Overcoming the network bandwidth or reliability limitations.
- Processing data remotely to reduce latency.
- Providing a better security model to handle sensitive data.

OpenYurt has the following advantages in terms of compatibility and usability.
- **Kubernetes native**. It provides full Kubernetes API compatibility. All Kubernetes workloads, services,
Expand Down
2 changes: 1 addition & 1 deletion cmd/yurt-controller-manager/app/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const (
YurtControllerManagerUserAgent = "yurt-controller-manager"
)

// KubeControllerManagerOptions is the main context object for the kube-controller manager.
// YurtControllerManagerOptions is the main context object for the kube-controller manager.
type YurtControllerManagerOptions struct {
Generic *GenericControllerManagerConfigurationOptions
NodeLifecycleController *NodeLifecycleControllerOptions
Expand Down
4 changes: 2 additions & 2 deletions cmd/yurthub/app/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package options
import (
"fmt"

"github.com/spf13/pflag"
"github.com/alibaba/openyurt/pkg/yurthub/util"
"github.com/spf13/pflag"
)

type YurtHubOptions struct {
Expand Down Expand Up @@ -43,7 +43,7 @@ func ValidateOptions(options *YurtHubOptions) error {
}

if len(options.ServerAddr) == 0 {
return fmt.Errorf("server-address is emtpy")
return fmt.Errorf("server-address is empty")
}

if !util.IsSupportedLBMode(options.LBMode) {
Expand Down
3 changes: 1 addition & 2 deletions pkg/yurthub/cachemanager/cache_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ func compareAgents(gotAgents []string, expectedAgents []string) bool {
return false
}

notFound := true
for _, agent := range gotAgents {
notFound = true
notFound := true
for i := range expectedAgents {
if expectedAgents[i] == agent {
notFound = false
Expand Down
6 changes: 2 additions & 4 deletions pkg/yurthub/storage/disk/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,8 @@ func TestListKeys(t *testing.T) {
t.Errorf("expect %d keys, but got %d keys", len(tempKeys), len(keys))
}

found := false
for _, key := range tempKeys {
found = false
found := false
for _, cachedKey := range keys {
if key == cachedKey {
found = true
Expand Down Expand Up @@ -369,9 +368,8 @@ func TestList(t *testing.T) {
t.Errorf("expect %d number of contents, but got %d number of contents", len(tempContents), len(contents))
}

found := false
for _, content := range tempContents {
found = false
found := false
for _, cachedContent := range contents {
if content == string(cachedContent) {
found = true
Expand Down

0 comments on commit 66f4463

Please sign in to comment.