{"action":"created","issue":{"url":"https://api.github.com/repos/hairyhenderson/gomplate/issues/290","repository_url":"https://api.github.com/repos/hairyhenderson/gomplate","labels_url":"https://api.github.com/repos/hairyhenderson/gomplate/issues/290/labels{/name}","comments_url":"https://api.github.com/repos/hairyhenderson/gomplate/issues/290/comments","events_url":"https://api.github.com/repos/hairyhenderson/gomplate/issues/290/events","html_url":"https://github.com/hairyhenderson/gomplate/issues/290","id":315672071,"number":290,"title":"unexpected \"|\" in template clause","user":{"login":"estahn","id":362174,"avatar_url":"https://avatars3.githubusercontent.com/u/362174?v=4","gravatar_id":"","url":"https://api.github.com/users/estahn","html_url":"https://github.com/estahn","followers_url":"https://api.github.com/users/estahn/followers","following_url":"https://api.github.com/users/estahn/following{/other_user}","gists_url":"https://api.github.com/users/estahn/gists{/gist_id}","starred_url":"https://api.github.com/users/estahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estahn/subscriptions","organizations_url":"https://api.github.com/users/estahn/orgs","repos_url":"https://api.github.com/users/estahn/repos","events_url":"https://api.github.com/users/estahn/events{/privacy}","received_events_url":"https://api.github.com/users/estahn/received_events","type":"User","site_admin":false},"labels":[{"id":315537431,"url":"https://api.github.com/repos/hairyhenderson/gomplate/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"hairyhenderson","id":2037086,"avatar_url":"https://avatars3.githubusercontent.com/u/2037086?v=4","gravatar_id":"","url":"https://api.github.com/users/hairyhenderson","html_url":"https://github.com/hairyhenderson","followers_url":"https://api.github.com/users/hairyhenderson/followers","following_url":"https://api.github.com/users/hairyhenderson/following{/other_user}","gists_url":"https://api.github.com/users/hairyhenderson/gists{/gist_id}","starred_url":"https://api.github.com/users/hairyhenderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hairyhenderson/subscriptions","organizations_url":"https://api.github.com/users/hairyhenderson/orgs","repos_url":"https://api.github.com/users/hairyhenderson/repos","events_url":"https://api.github.com/users/hairyhenderson/events{/privacy}","received_events_url":"https://api.github.com/users/hairyhenderson/received_events","type":"User","site_admin":false},"assignees":[{"login":"hairyhenderson","id":2037086,"avatar_url":"https://avatars3.githubusercontent.com/u/2037086?v=4","gravatar_id":"","url":"https://api.github.com/users/hairyhenderson","html_url":"https://github.com/hairyhenderson","followers_url":"https://api.github.com/users/hairyhenderson/followers","following_url":"https://api.github.com/users/hairyhenderson/following{/other_user}","gists_url":"https://api.github.com/users/hairyhenderson/gists{/gist_id}","starred_url":"https://api.github.com/users/hairyhenderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hairyhenderson/subscriptions","organizations_url":"https://api.github.com/users/hairyhenderson/orgs","repos_url":"https://api.github.com/users/hairyhenderson/repos","events_url":"https://api.github.com/users/hairyhenderson/events{/privacy}","received_events_url":"https://api.github.com/users/hairyhenderson/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-04-18T23:04:00Z","updated_at":"2018-04-19T00:44:42Z","closed_at":null,"author_association":"NONE","body":"Template:\r\n```\r\n{{- template \"base\" -}}\r\n{{ define \"jobs\" }}\r\n  {{ template \"job-checkout_code\" | indent 4 }}\r\n{{ end }}\r\n```\r\n\r\nError message:\r\n```Error: template: -:39: unexpected \"|\" in template clause```"},"comment":{"url":"https://api.github.com/repos/hairyhenderson/gomplate/issues/comments/382573250","html_url":"https://github.com/hairyhenderson/gomplate/issues/290#issuecomment-382573250","issue_url":"https://api.github.com/repos/hairyhenderson/gomplate/issues/290","id":382573250,"user":{"login":"hairyhenderson","id":2037086,"avatar_url":"https://avatars3.githubusercontent.com/u/2037086?v=4","gravatar_id":"","url":"https://api.github.com/users/hairyhenderson","html_url":"https://github.com/hairyhenderson","followers_url":"https://api.github.com/users/hairyhenderson/followers","following_url":"https://api.github.com/users/hairyhenderson/following{/other_user}","gists_url":"https://api.github.com/users/hairyhenderson/gists{/gist_id}","starred_url":"https://api.github.com/users/hairyhenderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hairyhenderson/subscriptions","organizations_url":"https://api.github.com/users/hairyhenderson/orgs","repos_url":"https://api.github.com/users/hairyhenderson/repos","events_url":"https://api.github.com/users/hairyhenderson/events{/privacy}","received_events_url":"https://api.github.com/users/hairyhenderson/received_events","type":"User","site_admin":false},"created_at":"2018-04-19T00:44:42Z","updated_at":"2018-04-19T00:44:42Z","author_association":"OWNER","body":"Ok, this is a pretty widely-scoped bug. Essentially, I have a number of functions that accept only `string`s, which should really be able to handle anything, converting to `string` as necessary.\r\n\r\nInterestingly, at first glance `strings.Indent` _isn't_ only accepting `string`, and indeed it gives a different error:\r\n\r\n```console\r\n$ gomplate -i '{{define \"foo\"}}hello world{{end}}{{ template \"foo\" . | strings.Indent }}' \r\n2018/04/18 20:39:19 Indent: invalid arguments\r\n```\r\n\r\nThis is because it takes `...interface{}` as its arguments. It immediately fails if the last element in that array is a non-`string`, though.\r\n\r\nAll this to say - the fix for `strings.Indent`/`indent` will be slightly different than the fix for every other function that expects a `string`.\r\n\r\nI'm on it - just need to step out for a quick jog and I'll try and get a fix drafted tonight or tomorrow 👍"}}
{"actor":{"display_login":"hairyhenderson"}}