{"action":"closed","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13719","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13719/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13719/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/13719/events","html_url":"https://github.com/kubernetes/kubernetes/issues/13719","id":105563650,"number":13719,"title":"Consistent syntax in commented examples","user":{"login":"rhcarvalho","id":88819,"avatar_url":"https://avatars.githubusercontent.com/u/88819?v=3","gravatar_id":"","url":"https://api.github.com/users/rhcarvalho","html_url":"https://github.com/rhcarvalho","followers_url":"https://api.github.com/users/rhcarvalho/followers","following_url":"https://api.github.com/users/rhcarvalho/following{/other_user}","gists_url":"https://api.github.com/users/rhcarvalho/gists{/gist_id}","starred_url":"https://api.github.com/users/rhcarvalho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhcarvalho/subscriptions","organizations_url":"https://api.github.com/users/rhcarvalho/orgs","repos_url":"https://api.github.com/users/rhcarvalho/repos","events_url":"https://api.github.com/users/rhcarvalho/events{/privacy}","received_events_url":"https://api.github.com/users/rhcarvalho/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/component/kubectl","name":"component/kubectl","color":"0052cc"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/help-wanted","name":"help-wanted","color":"006b75"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/documentation","name":"kind/documentation","color":"c7def8"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/P3","name":"priority/P3","color":"fef2c0"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/ux","name":"team/ux","color":"d2b48c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-09-09T09:55:09Z","updated_at":"2016-03-11T16:47:17Z","closed_at":"2016-03-11T16:47:17Z","body":"About a month ago #12593 was merged. In the issue (#12426) that it was meant to solve, we had an example like this:\r\n```\r\n // Partially update a node using strategic merge patch\r\n kubectl patch node k8s-node-1 -p '{\"spec\":{\"unschedulable\":true}}'\r\n```\r\n\r\nBecoming:\r\n```\r\n # Partially update a node using strategic merge patch\r\n kubectl patch node k8s-node-1 -p '{\"spec\":{\"unschedulable\":true}}'\r\n```\r\n\r\nI can imagine copy-pasting that as is into a terminal, or into a file to run it as a bash script later.\r\nHowever, I think except for [one file](https://github.com/kubernetes/kubernetes/pull/12593/files#diff-c59558fac792ecdd67a419318d11ae92), all the examples that were changed followed this pattern:\r\n\r\n```diff\r\n-// List all pods in ps output format.\r\n+# List all pods in ps output format.\r\n $ kubectl get pods\r\n```\r\n\r\nIn this context, $ normally prefixes lines that are meant to be executed as normal user, while # lines are to be executed as root.\r\n\r\nI'd propose to have examples as either:\r\n```\r\n$ # comment\r\n$ command\r\n```\r\n\r\nOr, with the advantage of being easy to copy-paste, and the disadvantage of being unable to distinguish root vs. non-privileged user:\r\n```\r\n# comment\r\ncommand\r\n```\r\n\r\nOpinions?"}}