{"action":"created","issue":{"url":"https://api.github.com/repos/dgryski/trifles/issues/6","repository_url":"https://api.github.com/repos/dgryski/trifles","labels_url":"https://api.github.com/repos/dgryski/trifles/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/dgryski/trifles/issues/6/comments","events_url":"https://api.github.com/repos/dgryski/trifles/issues/6/events","html_url":"https://github.com/dgryski/trifles/pull/6","id":260514777,"number":6,"title":"Print phrase inside brackets as an optional flag","user":{"login":"benjamin-rood","id":10102132,"avatar_url":"https://avatars2.githubusercontent.com/u/10102132?v=4","gravatar_id":"","url":"https://api.github.com/users/benjamin-rood","html_url":"https://github.com/benjamin-rood","followers_url":"https://api.github.com/users/benjamin-rood/followers","following_url":"https://api.github.com/users/benjamin-rood/following{/other_user}","gists_url":"https://api.github.com/users/benjamin-rood/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamin-rood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamin-rood/subscriptions","organizations_url":"https://api.github.com/users/benjamin-rood/orgs","repos_url":"https://api.github.com/users/benjamin-rood/repos","events_url":"https://api.github.com/users/benjamin-rood/events{/privacy}","received_events_url":"https://api.github.com/users/benjamin-rood/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-26T07:09:28Z","updated_at":"2017-10-13T01:45:36Z","closed_at":"2017-10-10T22:49:40Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/dgryski/trifles/pulls/6","html_url":"https://github.com/dgryski/trifles/pull/6","diff_url":"https://github.com/dgryski/trifles/pull/6.diff","patch_url":"https://github.com/dgryski/trifles/pull/6.patch"},"body":"Added `bracketed` boolFlag (default: false) which provides the previous\r\nprinting behaviour `[first second third fourth fifth]` as an _option_,\r\nbut makes the default result `first second third fourth fifth`.\r\n\r\nThe brackets are an impediment, particularly for piping the output to\r\nsomething else – particularly the clipboard (e.g. `pphrase | pbcopy`).\r\n\r\nI can't see the practical use for printing this inside brackets, it's just\r\nthe Go behaviour for printing a slice of anything. If you want me to make\r\nthe `bracketed` flag default to true instead, preserving current behaviour,\r\nthat's fine, but I would be curious to hear the rationale, if possible?\r\n\r\n(I use `pphrase` all the time but the brackets have pissed me off for years\r\n– finally decided to do something about it.) "},"comment":{"url":"https://api.github.com/repos/dgryski/trifles/issues/comments/336327388","html_url":"https://github.com/dgryski/trifles/pull/6#issuecomment-336327388","issue_url":"https://api.github.com/repos/dgryski/trifles/issues/6","id":336327388,"user":{"login":"benjamin-rood","id":10102132,"avatar_url":"https://avatars2.githubusercontent.com/u/10102132?v=4","gravatar_id":"","url":"https://api.github.com/users/benjamin-rood","html_url":"https://github.com/benjamin-rood","followers_url":"https://api.github.com/users/benjamin-rood/followers","following_url":"https://api.github.com/users/benjamin-rood/following{/other_user}","gists_url":"https://api.github.com/users/benjamin-rood/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamin-rood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamin-rood/subscriptions","organizations_url":"https://api.github.com/users/benjamin-rood/orgs","repos_url":"https://api.github.com/users/benjamin-rood/repos","events_url":"https://api.github.com/users/benjamin-rood/events{/privacy}","received_events_url":"https://api.github.com/users/benjamin-rood/received_events","type":"User","site_admin":false},"created_at":"2017-10-13T01:45:36Z","updated_at":"2017-10-13T01:45:36Z","author_association":"CONTRIBUTOR","body":"Hi Damien, are you saying you want me to force push an update to `dgryski:master` over the top of the merge you just made? i.e. rebasing to include `cc4c8fe` and the new commit only?\r\n \r\n```\r\ndiff --git a/pphrase/main.go b/pphrase/main.go\r\nindex cd4bbaa..79d4164 100644\r\n--- a/pphrase/main.go\r\n+++ b/pphrase/main.go\r\n@@ -7,6 +7,7 @@ import (\r\n        \"fmt\"\r\n        \"log\"\r\n        \"os\"\r\n+       \"strings\"\r\n )\r\n\r\n func main() {\r\n@@ -48,6 +49,6 @@ func main() {\r\n                phrase = append(phrase, words[word])\r\n        }\r\n\r\n-       fmt.Println(phrase)\r\n+       fmt.Println(strings.Join(phrase, \" \"))\r\n\r\n }\r\n```"}}
{"actor":{"display_login":"benjamin-rood"}}