{"action":"created","comment":{"url":"https://api.github.com/repos/minishift/minishift/pulls/comments/205742056","pull_request_review_id":141067523,"id":205742056,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTc0MjA1Ng==","diff_hunk":"@@ -194,52 +192,3 @@ func configurableFields() string {\n \t}\n \treturn strings.Join(fields, \"\\n\")\n }\n-\n-// ReadConfig reads the config from $MINISHIFT_HOME/config/config.json file\n-func ReadConfig() (MinishiftConfig, error) {\n-\tf, err := os.Open(constants.ConfigFile)\n-\tif err != nil {\n-\t\tif os.IsNotExist(err) {\n-\t\t\treturn make(map[string]interface{}), nil\n-\t\t}\n-\t\treturn nil, fmt.Errorf(\"Cannot open file '%s': %s\", constants.ConfigFile, err)\n-\t}\n-\tvar m MinishiftConfig\n-\tm, err = decode(f)\n-\tif err != nil {\n-\t\treturn nil, fmt.Errorf(\"Cannot decode config '%s': %s\", constants.ConfigFile, err)\n-\t}\n-\n-\treturn m, nil\n-}\n-\n-// Writes a config to the $MINISHIFT_HOME/config/config.json file\n-func WriteConfig(m MinishiftConfig) error {\n-\tf, err := os.Create(constants.ConfigFile)\n-\tif err != nil {\n-\t\treturn fmt.Errorf(\"Cannot create file '%s': %s\", constants.ConfigFile, err)\n-\t}\n-\tdefer f.Close()\n-\terr = encode(f, m)\n-\tif err != nil {\n-\t\treturn fmt.Errorf(\"Cannot encode config '%s': %s\", constants.ConfigFile, err)\n-\t}\n-\treturn nil\n-}\n-\n-func decode(r io.Reader) (MinishiftConfig, error) {\n-\tvar data MinishiftConfig\n-\terr := json.NewDecoder(r).Decode(&data)\n-\treturn data, err\n-}\n-\n-func encode(w io.Writer, m MinishiftConfig) error {\n-\tb, err := json.MarshalIndent(m, \"\", \"    \")\n-\tif err != nil {\n-\t\treturn err\n-\t}\n-\n-\t_, err = w.Write(b)\n-\n-\treturn err\n-}","path":"cmd/minishift/cmd/config/config.go","position":113,"original_position":113,"commit_id":"01d5b3a3312cee704579a9a12d4ef6cbfae5d426","original_commit_id":"01d5b3a3312cee704579a9a12d4ef6cbfae5d426","user":{"login":"LalatenduMohanty","id":3125299,"node_id":"MDQ6VXNlcjMxMjUyOTk=","avatar_url":"https://avatars2.githubusercontent.com/u/3125299?v=4","gravatar_id":"","url":"https://api.github.com/users/LalatenduMohanty","html_url":"https://github.com/LalatenduMohanty","followers_url":"https://api.github.com/users/LalatenduMohanty/followers","following_url":"https://api.github.com/users/LalatenduMohanty/following{/other_user}","gists_url":"https://api.github.com/users/LalatenduMohanty/gists{/gist_id}","starred_url":"https://api.github.com/users/LalatenduMohanty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LalatenduMohanty/subscriptions","organizations_url":"https://api.github.com/users/LalatenduMohanty/orgs","repos_url":"https://api.github.com/users/LalatenduMohanty/repos","events_url":"https://api.github.com/users/LalatenduMohanty/events{/privacy}","received_events_url":"https://api.github.com/users/LalatenduMohanty/received_events","type":"User","site_admin":false},"body":"@praveenkumar What is the motivation behind moving these to pkg?","created_at":"2018-07-27T11:15:44Z","updated_at":"2018-07-27T11:17:35Z","html_url":"https://github.com/minishift/minishift/pull/2616#discussion_r205742056","pull_request_url":"https://api.github.com/repos/minishift/minishift/pulls/2616","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/minishift/minishift/pulls/comments/205742056"},"html":{"href":"https://github.com/minishift/minishift/pull/2616#discussion_r205742056"},"pull_request":{"href":"https://api.github.com/repos/minishift/minishift/pulls/2616"}}},"pull_request":{"url":"https://api.github.com/repos/minishift/minishift/pulls/2616","id":202524802,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyNTI0ODAy","html_url":"https://github.com/minishift/minishift/pull/2616","diff_url":"https://github.com/minishift/minishift/pull/2616.diff","patch_url":"https://github.com/minishift/minishift/pull/2616.patch","issue_url":"https://api.github.com/repos/minishift/minishift/issues/2616","number":2616,"state":"open","locked":false,"title":"Issue #1517 Config: Create a global config","user":{"login":"praveenkumar","id":410007,"node_id":"MDQ6VXNlcjQxMDAwNw==","avatar_url":"https://avatars2.githubusercontent.com/u/410007?v=4","gravatar_id":"","url":"https://api.github.com/users/praveenkumar","html_url":"https://github.com/praveenkumar","followers_url":"https://api.github.com/users/praveenkumar/followers","following_url":"https://api.github.com/users/praveenkumar/following{/other_user}","gists_url":"https://api.github.com/users/praveenkumar/gists{/gist_id}","starred_url":"https://api.github.com/users/praveenkumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praveenkumar/subscriptions","organizations_url":"https://api.github.com/users/praveenkumar/orgs","repos_url":"https://api.github.com/users/praveenkumar/repos","events_url":"https://api.github.com/users/praveenkumar/events{/privacy}","received_events_url":"https://api.github.com/users/praveenkumar/received_events","type":"User","site_admin":false},"body":"How to test\r\n=========\r\n\r\n```\r\n11:08 $ ./minishift config view\r\n- memory                             : 8096\r\n- skip-check-openshift-release       : true\r\n- vm-driver                          : virtualbox\r\n\r\n11:08 $ ./minishift config view --global\r\n- memory                             : 4096\r\n- skip-check-openshift-release       : true\r\n- vm-driver                          : virtualbox\r\n\r\n11:08 $ ./minishift config unset vm-driver\r\nProperty name 'vm-driver' successfully unset\r\n\r\n11:09 $ ./minishift config view --global\r\n- memory                             : 4096\r\n- skip-check-openshift-release       : true\r\n- vm-driver                          : virtualbox\r\n \r\n11:09 $ ./minishift config view\r\n- memory                             : 8096\r\n- skip-check-openshift-release       : true\r\n\r\n11:09 $ ./minishift start \r\n-- Starting profile 'minishift'\r\n-- Check if deprecated options are used ... OK\r\n-- Checking if https://github.com is reachable ... OK\r\n-- Checking if requested OpenShift version 'v3.9.0' is valid ... SKIP\r\n-- Checking if requested OpenShift version 'v3.9.0' is supported ... OK\r\n-- Checking if requested hypervisor 'virtualbox' is supported on this platform ... OK\r\n-- Checking if VirtualBox is installed ... OK\r\n-- Checking the ISO URL ... OK\r\n-- Checking if provided oc flags are supported ... OK\r\n-- Starting the OpenShift cluster using 'virtualbox' hypervisor ... => Taken from global config\r\n-- Minishift VM will be configured with ...\r\n   Memory:    7 GB   => take from the instance specific config \r\n   vCPUs :    2\r\n   Disk size: 20 GB\r\n```\r\n\r\nGlobal flag command structure.\r\n```\r\n$ minishift config set --global\r\n$ minishift config view --global\r\n$ minishift config unset --global\r\n```\r\n\r\nPrecedence order\r\n\r\n```\r\n1. A user-defined flag.\r\n2. Environment variable.\r\n3. Instance-specific config\r\n4. Global config\r\n```\r\n\r\n@jorgemoralespou Does this works for you?\r\n","created_at":"2018-07-19T11:11:48Z","updated_at":"2018-07-27T11:17:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c3d503dd8b76d2482441a843187d8ffe29e85bd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/minishift/minishift/pulls/2616/commits","review_comments_url":"https://api.github.com/repos/minishift/minishift/pulls/2616/comments","review_comment_url":"https://api.github.com/repos/minishift/minishift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minishift/minishift/issues/2616/comments","statuses_url":"https://api.github.com/repos/minishift/minishift/statuses/01d5b3a3312cee704579a9a12d4ef6cbfae5d426","head":{"label":"praveenkumar:issue_1517","ref":"issue_1517","sha":"01d5b3a3312cee704579a9a12d4ef6cbfae5d426","user":{"login":"praveenkumar","id":410007,"node_id":"MDQ6VXNlcjQxMDAwNw==","avatar_url":"https://avatars2.githubusercontent.com/u/410007?v=4","gravatar_id":"","url":"https://api.github.com/users/praveenkumar","html_url":"https://github.com/praveenkumar","followers_url":"https://api.github.com/users/praveenkumar/followers","following_url":"https://api.github.com/users/praveenkumar/following{/other_user}","gists_url":"https://api.github.com/users/praveenkumar/gists{/gist_id}","starred_url":"https://api.github.com/users/praveenkumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praveenkumar/subscriptions","organizations_url":"https://api.github.com/users/praveenkumar/orgs","repos_url":"https://api.github.com/users/praveenkumar/repos","events_url":"https://api.github.com/users/praveenkumar/events{/privacy}","received_events_url":"https://api.github.com/users/praveenkumar/received_events","type":"User","site_admin":false},"repo":{"id":74443040,"node_id":"MDEwOlJlcG9zaXRvcnk3NDQ0MzA0MA==","name":"minishift","full_name":"praveenkumar/minishift","owner":{"login":"praveenkumar","id":410007,"node_id":"MDQ6VXNlcjQxMDAwNw==","avatar_url":"https://avatars2.githubusercontent.com/u/410007?v=4","gravatar_id":"","url":"https://api.github.com/users/praveenkumar","html_url":"https://github.com/praveenkumar","followers_url":"https://api.github.com/users/praveenkumar/followers","following_url":"https://api.github.com/users/praveenkumar/following{/other_user}","gists_url":"https://api.github.com/users/praveenkumar/gists{/gist_id}","starred_url":"https://api.github.com/users/praveenkumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praveenkumar/subscriptions","organizations_url":"https://api.github.com/users/praveenkumar/orgs","repos_url":"https://api.github.com/users/praveenkumar/repos","events_url":"https://api.github.com/users/praveenkumar/events{/privacy}","received_events_url":"https://api.github.com/users/praveenkumar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/praveenkumar/minishift","description":null,"fork":true,"url":"https://api.github.com/repos/praveenkumar/minishift","forks_url":"https://api.github.com/repos/praveenkumar/minishift/forks","keys_url":"https://api.github.com/repos/praveenkumar/minishift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praveenkumar/minishift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praveenkumar/minishift/teams","hooks_url":"https://api.github.com/repos/praveenkumar/minishift/hooks","issue_events_url":"https://api.github.com/repos/praveenkumar/minishift/issues/events{/number}","events_url":"https://api.github.com/repos/praveenkumar/minishift/events","assignees_url":"https://api.github.com/repos/praveenkumar/minishift/assignees{/user}","branches_url":"https://api.github.com/repos/praveenkumar/minishift/branches{/branch}","tags_url":"https://api.github.com/repos/praveenkumar/minishift/tags","blobs_url":"https://api.github.com/repos/praveenkumar/minishift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praveenkumar/minishift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praveenkumar/minishift/git/refs{/sha}","trees_url":"https://api.github.com/repos/praveenkumar/minishift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praveenkumar/minishift/statuses/{sha}","languages_url":"https://api.github.com/repos/praveenkumar/minishift/languages","stargazers_url":"https://api.github.com/repos/praveenkumar/minishift/stargazers","contributors_url":"https://api.github.com/repos/praveenkumar/minishift/contributors","subscribers_url":"https://api.github.com/repos/praveenkumar/minishift/subscribers","subscription_url":"https://api.github.com/repos/praveenkumar/minishift/subscription","commits_url":"https://api.github.com/repos/praveenkumar/minishift/commits{/sha}","git_commits_url":"https://api.github.com/repos/praveenkumar/minishift/git/commits{/sha}","comments_url":"https://api.github.com/repos/praveenkumar/minishift/comments{/number}","issue_comment_url":"https://api.github.com/repos/praveenkumar/minishift/issues/comments{/number}","contents_url":"https://api.github.com/repos/praveenkumar/minishift/contents/{+path}","compare_url":"https://api.github.com/repos/praveenkumar/minishift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praveenkumar/minishift/merges","archive_url":"https://api.github.com/repos/praveenkumar/minishift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praveenkumar/minishift/downloads","issues_url":"https://api.github.com/repos/praveenkumar/minishift/issues{/number}","pulls_url":"https://api.github.com/repos/praveenkumar/minishift/pulls{/number}","milestones_url":"https://api.github.com/repos/praveenkumar/minishift/milestones{/number}","notifications_url":"https://api.github.com/repos/praveenkumar/minishift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praveenkumar/minishift/labels{/name}","releases_url":"https://api.github.com/repos/praveenkumar/minishift/releases{/id}","deployments_url":"https://api.github.com/repos/praveenkumar/minishift/deployments","created_at":"2016-11-22T06:46:12Z","updated_at":"2016-11-22T06:46:15Z","pushed_at":"2018-07-26T11:28:10Z","git_url":"git://github.com/praveenkumar/minishift.git","ssh_url":"git@github.com:praveenkumar/minishift.git","clone_url":"https://github.com/praveenkumar/minishift.git","svn_url":"https://github.com/praveenkumar/minishift","homepage":null,"size":174940,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"minishift:master","ref":"master","sha":"426f93c2c977521ff0ca465157e62efc45ebcf49","user":{"login":"minishift","id":23212309,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjEyMzA5","avatar_url":"https://avatars1.githubusercontent.com/u/23212309?v=4","gravatar_id":"","url":"https://api.github.com/users/minishift","html_url":"https://github.com/minishift","followers_url":"https://api.github.com/users/minishift/followers","following_url":"https://api.github.com/users/minishift/following{/other_user}","gists_url":"https://api.github.com/users/minishift/gists{/gist_id}","starred_url":"https://api.github.com/users/minishift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minishift/subscriptions","organizations_url":"https://api.github.com/users/minishift/orgs","repos_url":"https://api.github.com/users/minishift/repos","events_url":"https://api.github.com/users/minishift/events{/privacy}","received_events_url":"https://api.github.com/users/minishift/received_events","type":"Organization","site_admin":false},"repo":{"id":62728051,"node_id":"MDEwOlJlcG9zaXRvcnk2MjcyODA1MQ==","name":"minishift","full_name":"minishift/minishift","owner":{"login":"minishift","id":23212309,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjEyMzA5","avatar_url":"https://avatars1.githubusercontent.com/u/23212309?v=4","gravatar_id":"","url":"https://api.github.com/users/minishift","html_url":"https://github.com/minishift","followers_url":"https://api.github.com/users/minishift/followers","following_url":"https://api.github.com/users/minishift/following{/other_user}","gists_url":"https://api.github.com/users/minishift/gists{/gist_id}","starred_url":"https://api.github.com/users/minishift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minishift/subscriptions","organizations_url":"https://api.github.com/users/minishift/orgs","repos_url":"https://api.github.com/users/minishift/repos","events_url":"https://api.github.com/users/minishift/events{/privacy}","received_events_url":"https://api.github.com/users/minishift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/minishift/minishift","description":"Run OpenShift locally","fork":false,"url":"https://api.github.com/repos/minishift/minishift","forks_url":"https://api.github.com/repos/minishift/minishift/forks","keys_url":"https://api.github.com/repos/minishift/minishift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minishift/minishift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minishift/minishift/teams","hooks_url":"https://api.github.com/repos/minishift/minishift/hooks","issue_events_url":"https://api.github.com/repos/minishift/minishift/issues/events{/number}","events_url":"https://api.github.com/repos/minishift/minishift/events","assignees_url":"https://api.github.com/repos/minishift/minishift/assignees{/user}","branches_url":"https://api.github.com/repos/minishift/minishift/branches{/branch}","tags_url":"https://api.github.com/repos/minishift/minishift/tags","blobs_url":"https://api.github.com/repos/minishift/minishift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minishift/minishift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minishift/minishift/git/refs{/sha}","trees_url":"https://api.github.com/repos/minishift/minishift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minishift/minishift/statuses/{sha}","languages_url":"https://api.github.com/repos/minishift/minishift/languages","stargazers_url":"https://api.github.com/repos/minishift/minishift/stargazers","contributors_url":"https://api.github.com/repos/minishift/minishift/contributors","subscribers_url":"https://api.github.com/repos/minishift/minishift/subscribers","subscription_url":"https://api.github.com/repos/minishift/minishift/subscription","commits_url":"https://api.github.com/repos/minishift/minishift/commits{/sha}","git_commits_url":"https://api.github.com/repos/minishift/minishift/git/commits{/sha}","comments_url":"https://api.github.com/repos/minishift/minishift/comments{/number}","issue_comment_url":"https://api.github.com/repos/minishift/minishift/issues/comments{/number}","contents_url":"https://api.github.com/repos/minishift/minishift/contents/{+path}","compare_url":"https://api.github.com/repos/minishift/minishift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minishift/minishift/merges","archive_url":"https://api.github.com/repos/minishift/minishift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minishift/minishift/downloads","issues_url":"https://api.github.com/repos/minishift/minishift/issues{/number}","pulls_url":"https://api.github.com/repos/minishift/minishift/pulls{/number}","milestones_url":"https://api.github.com/repos/minishift/minishift/milestones{/number}","notifications_url":"https://api.github.com/repos/minishift/minishift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minishift/minishift/labels{/name}","releases_url":"https://api.github.com/repos/minishift/minishift/releases{/id}","deployments_url":"https://api.github.com/repos/minishift/minishift/deployments","created_at":"2016-07-06T14:37:20Z","updated_at":"2018-07-27T08:07:58Z","pushed_at":"2018-07-26T15:46:44Z","git_url":"git://github.com/minishift/minishift.git","ssh_url":"git@github.com:minishift/minishift.git","clone_url":"https://github.com/minishift/minishift.git","svn_url":"https://github.com/minishift/minishift","homepage":"","size":174822,"stargazers_count":1173,"watchers_count":1173,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":251,"mirror_url":null,"archived":false,"open_issues_count":228,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":251,"open_issues":228,"watchers":1173,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minishift/minishift/pulls/2616"},"html":{"href":"https://github.com/minishift/minishift/pull/2616"},"issue":{"href":"https://api.github.com/repos/minishift/minishift/issues/2616"},"comments":{"href":"https://api.github.com/repos/minishift/minishift/issues/2616/comments"},"review_comments":{"href":"https://api.github.com/repos/minishift/minishift/pulls/2616/comments"},"review_comment":{"href":"https://api.github.com/repos/minishift/minishift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minishift/minishift/pulls/2616/commits"},"statuses":{"href":"https://api.github.com/repos/minishift/minishift/statuses/01d5b3a3312cee704579a9a12d4ef6cbfae5d426"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"LalatenduMohanty"}}