Skip to content

Commit

Permalink
NO-STORY fix typos (RedHatInsights#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfindra authored Aug 17, 2023
1 parent e78371b commit 0213b58
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ For an example see `cat ./scripts/xrhid_helper.sh`

## Testing the bundle-sync

To test the bundle sync behavior, you'll need to configure your environment similar to the insructions above, build the script, and run it against the dev environment:
To test the bundle sync behavior, you'll need to configure your environment similar to the instructions above, build the script, and run it against the dev environment:

```sh
. ./local/development.env.sh
Expand Down
2 changes: 1 addition & 1 deletion apispec/api.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
],
"info": {
"description": "Service for determining subscriptions in cloud management\n[cloud.redhat.com](http://cloud.redhat.com/api/v1/entitlements)\n",
"description": "Service for determining subscriptions in cloud management\n[console.redhat.com](http://console.redhat.com/api/v1/entitlements)\n",
"version": "1.0.0",
"title": "Entitlements",
"contact": {
Expand Down
16 changes: 7 additions & 9 deletions bundle_sync/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"gopkg.in/yaml.v2"
)

// assertEq compares two slices of strings and returns true if they are equalzs
// assertEq compares two slices of strings and returns true if they are equal
func assertEq(test []string, ans []string) bool {
return reflect.DeepEqual(test, ans)
return reflect.DeepEqual(test, ans)
}

// getClient sets up the http client for the subscriptions API
Expand Down Expand Up @@ -72,13 +72,12 @@ func getCurrent(client *http.Client, url string) (t.SubModel, error) {
return currentSubs, nil
}

func getUpdates(cfg *viper.Viper) ([]t.Bundle, error){
func getUpdates(cfg *viper.Viper) ([]t.Bundle, error) {
bundlesYaml, err := ioutil.ReadFile(cfg.GetString("BUNDLE_INFO_YAML"))
if err != nil {
return []t.Bundle{}, err
}


var m []t.Bundle
err = yaml.Unmarshal(bundlesYaml, &m)
if err != nil {
Expand All @@ -101,7 +100,6 @@ func postUpdates(cfg *viper.Viper, client *http.Client, data []byte) error {

}


func main() {
c := cfg.GetConfig()
client := getClient(c)
Expand All @@ -118,10 +116,10 @@ func main() {
skus := make(map[string][]string)
current_skus := make(map[string][]string)
url := fmt.Sprintf("%s%s%s",
options.GetString("SUBS_HOST"),
options.GetString("SUB_API_BASE_PATH"),
"features/")
current, err := getCurrent(client, url + endpoint)
options.GetString("SUBS_HOST"),
options.GetString("SUB_API_BASE_PATH"),
"features/")
current, err := getCurrent(client, url+endpoint)
if err != nil {
log.Fatalf("Unable to get current subscriptions: %s", err)
os.Exit(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,7 @@ data:
}
kind: ConfigMap
metadata:
name: grafana-dashboard-consoledot-entilements-operations
name: grafana-dashboard-consoledot-entitlements-operations
labels:
grafana_dashboard: "true"
annotations:
Expand Down
2 changes: 1 addition & 1 deletion types/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ type SubModel struct {
Rules Rules `json:"rules"`
}

// Rules contains match and exlude product arrays
// Rules contains match and exclude product arrays
type Rules struct {
MatchProducts []MatchProducts `json:"matchProducts,omitempty"`
ExcludeProducts []ExcludeProducts `json:"excludeProducts,omitempty"`
Expand Down

0 comments on commit 0213b58

Please sign in to comment.