[
https://issues.apache.org/jira/browse/HTRACE-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14261689#comment-14261689
]
Colin Patrick McCabe commented on HTRACE-35:
--------------------------------------------
bq. Is "__" safe? Do three or four of them? If you can't use a fs unsafe
character altogether.
I think underscores are fine to use. Since we're generating a file, the
character has to be safe to use on both UNIX and Windows, and underscore fits
that requirement. I think it's pretty unlikely that anyone will put two
underscores in a file name... can switch to three if that becomes a problem,
though.
bq. Otherwise, +1. Skimmed. At limits of my go code reviewing. Need to go off
and learn it before I review any more.
Thanks.
Maybe one golang feature thing that might be confusing in this patch is that it
uses a lambda (aka anonymous function).
{code}
err = filepath.Walk(absSrc, func(path string, info os.FileInfo, err error)
error {
...
})
{code}
This could have been rewritten as
{code}
func handleFunction(path string, info os.FileInfo, err error) error {
...
}
err = filepath.Walk(absSrc, handleFunction)
{code}
But it's not too bad when you get used to it... I think java is getting
function lambdas soon (or maybe it got them in java 8?)
> bundler: support nested js and html files
> -----------------------------------------
>
> Key: HTRACE-35
> URL: https://issues.apache.org/jira/browse/HTRACE-35
> Project: HTrace
> Issue Type: Bug
> Reporter: Colin Patrick McCabe
> Assignee: Colin Patrick McCabe
> Attachments: HTRACE-35.001.patch
>
>
> Support bundling nested js and html files into htraced
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)