• str1ngs
        so go get go build works
      • cenuij
        I meant *didn't* have pre-built archives
      • str1ngs
        that might be a better solution
      • I dont think as it stands systemd level go packages make sense
      • that just my opinion, but at some point it will be needed
      • cenuij
        but on a practcle level, I use the package management install known verions
      • str1ngs
        that is useful I agree
      • peregrine81 joined the channel
      • but you will find, most people using going are likely to use rsync $GOBIN/ server:/adfffff/
      • wrtp has quit
      • using go*
      • cenuij
        I had not considered that option, a network share with the canonical pacakge builds
      • str1ngs
        thats how I do it. and that where go strength is. in static binaries
      • cenuij
        that still leave the proble, a user may have newer source for that package in his local gopath
      • str1ngs
        users of go packages are not users though. there developers
      • this only becomes a factor when we have cool go programs that people use on a distro level
      • but forward thinking is good. interms of how do we system package this later on.
      • belak
        Meh, not sure what to do about the functions that take a buffer
      • cenuij
        at the moment, I think it can be managed at a resonable level outside of the go sphere of influence.
      • Deaygo has quit
      • str1ngs: also, given the time from using autotools up until using the "go" toochain
      • str1ngs: well it's just fine ;)
      • str1ngs
        go breaks the mold, which is refreshing
      • cenuij
        str1ngs: it if gets more than a grumble frome few edge users, soemthing will happen ;)
      • str1ngs
        but its going to be a long haul before people even get that its feature, never mind adopting said feature :P
      • Deaygo joined the channel
      • peregrine81 has quit
      • ping-pong joined the channel
      • cenuij
        belak: sorry, you have an issue with functions that take a bytes.BUffer?
      • pietro10 joined the channel
      • str1ngs
        belak: a git function?
      • belak: you mean as in a C stream C.FILE ?
      • ecin has quit
      • pietro10
        http://play.golang.org/p/2H7Y7QAwCS can I improve this HTML generation with templates? /should/ I?
      • would I need two templates for the stuff that is iterated?
      • str1ngs
        use templates yes
      • pietro10
      • |Craig| joined the channel
      • I'm asking if it would be wroth the effort, and how much would I need
      • hallas has quit
      • str1ngs
        way less effort then what you are corrently using
      • pietro10
      • str1ngs
        also templates dont need to be statically compiled ya :P
      • message144 has quit
      • pietro10
        I would rather, at least for now
      • str1ngs
        of course just mean for later
      • pietro10
        this system is already using on eexternal file (the SQL password, but I dont know how I'll handle that if I do decide to release the code for htis)
      • yeah
      • kickingvegas joined the channel
      • str1ngs
        for sql password say some config. I use json for my config files
      • pietro10
        I'd definitely like to release the code for this project though =P
      • maybe I'll put all the SQL credentials in the config file then
      • Nisstyre_ has quit
      • so now to figure out how to adjust this for templates
      • the only other HTML that is generated is the HTML returned by scans.HTML
      • str1ngs
        yes that Sprintf is rather.. you can replace with template :P
      • Nisstyre_ joined the channel
      • in this case maybe as simple as passing stats to a template.
      • pietro10
        I can call structure methods in the templates right?
      • str1ngs
        I generally use fields for this, but let me check
      • pietro10
        I ask because of how I got the progress bars in that second block that you just said use templates with!
      • str1ngs
        The name of a niladic method of the data, preceded by a period,
      • such as
      • .Method
      • yes yes
      • so yes*
      • but.. you may need to export those methods
      • ie stats.MediaBad()
      • pietro10
        they are eported - see the code! :D
      • I don't know why
      • but I do
      • cgtdk
      • pietro10
      • str1ngs
        pietro10: I might have miss read what fields/methods you want to output. but you get the idea?
      • pietro10
      • and now I see a problem
      • can I even do this (abstract the HTML generation for Stats) with html/template?
      • due to how it protects against injection
      • str1ngs
        I dont see why not
      • which part are you worried about img src?
      • AlexMax has quit
      • pietro10
      • AlexMax joined the channel
      • I am calling HTML() to generate a HTML report of the Stats structure
      • kickingvegas has quit
      • I wonder how I can have that integrated into the main template
      • would {{overallStats.HTML}} in html/template just cause the HTML to be escaped properly to avoid injections?
      • or does that only apply to dot
      • jergason joined the channel
      • dmaz_ joined the channel
      • harrison has quit
      • ah
      • have HTML() return template.HTML instead of string
      • that's how
      • dmaz has quit
      • ecin joined the channel
      • c0rn_ has quit
      • thrashr888 has quit
      • nsf joined the channel
      • io2 has quit
      • jordanorelli has quit
      • xps joined the channel
      • dsal joined the channel
      • beatgammit joined the channel
      • tonik has quit
      • horofox joined the channel
      • philwhln has quit
      • raysun joined the channel
      • cenuij
        uriel: yes i see that thread now, I'm not sure I agree with you.
      • davecheney joined the channel
      • ecin has quit
      • allandeq_ has quit
      • uriel: I can't see an immediate benefit from the change for me because I use Go via pre-built pacakges (not the canonical versions)
      • MouseMan joined the channel
      • uriel: but overall, eliminating autotools and such old cruft should be naturally a gial
      • Eridius_ has quit
      • s/gia/goal
      • uriel: as you know, droping make etc and adopting the go tool put Go the language on a step above
      • rcrowley has quit
      • uriel
        well, there is nothing even remotely like autotools left, is all about cleaning up and tidying up the last remaining bits
      • cenuij
        uriel: i understand
      • uriel
        mostly to make things less annoying to people that run things like OpenBSD
      • or who have deep entrenched anti-gnu tendencies
      • horofox has quit
      • cenuij
        uriel: I understand that, my old avatar was the bsd devil sodomising Tux
      • AlexMax
      • cenuij
        AlexMax: shut up
      • AlexMax
      • mcef
        Isn't that ``GIU''?
      • AlexMax
      • [redacted]
      • [redacted]
      • [redacted]
      • cenuij
        That's ok
      • mglmn has quit
      • uriel: the problem with Go currently from my persepctive
      • hasenj joined the channel
      • pietro10
      • am I trying to do too much with a template here?
      • will I need to rebuild the Stats array from scratch?
      • cenuij
        is that it's impossible to try and introduce my distro users to Go without sacrificing something
      • Eridius_ joined the channel
      • The official Go way is just drop it all in a convenient dir and go for it
      • uriel
        cenuij: well, i understand there are other packaging issues, but I'm taking one thing at a time
      • davecheney has quit
      • replacing the last few scripts with Go is a very inocuous change
      • it shouldn't break anything
      • cenuij
        uriel: I suspect it's legacy reasons they are left