• W. Trevor King's avatar
    core/commands/unixfs/ls: Set Argument in JSON output · c9733c5d
    W. Trevor King authored
    Change the approach to the directory-header control so we can set the
    Argument value in the JSON response.
    
    Stripping the trailing newline from the JSON output is annoying, but
    looking over [1] I saw no easy way to add a newline to the JSON
    output.  And with the general framework that commands/ attempts to be,
    it feels a bit funny to customize the JSON output for a command-line
    program.  Perhaps a workable solution is to have the command-line
    client append newlines to any output that otherwise lacks them?  But
    that seems like a change best left to a separate series.
    
    [1]: http://golang.org/pkg/encoding/json/
    
    License: MIT
    Signed-off-by: default avatarW. Trevor King <wking@tremily.us>
    c9733c5d
t0200-unixfs-ls.sh 3.3 KB