[go-nuts] Re: Choosing a framework

2017-09-13 Thread Kevin Powick
Asked and answered many times in this group and in another popular Go forum: https://forum.golangbridge.org/search?q=framework Another collection of Go frameworks, tools, packages (libs) can be found in the following GitHub repo: https://github.com/avelino/awesome-go#web-frameworks There are

[go-nuts] go test looking for a C library when the package actually does not contain any test files

2017-09-13 Thread Ondřej Kupka
Hi, I am running go test on a set of packages. Some of these packages do contain tests and some don't. The packages that *don't* contain any test files import a Kafka package that links librdkafka and uses Cgo. When I run go test with this set of packages I end up getting # pkg-config --cflags

[go-nuts] Go at Vimeo in NYC!

2017-09-13 Thread gabriella
We have lots of jobs programming in Go at Vimeo's headquarters in NYC! Please reach out to me at gabrie...@vimeo.com if you or anyone you know may be interested. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

Re: [go-nuts] go test looking for a C library when the package actually does not contain any test files

2017-09-13 Thread Ian Lance Taylor
On Wed, Sep 13, 2017 at 9:06 AM, Ondřej Kupka wrote: > > I am running go test on a set of packages. Some of these packages do contain > tests and some don't. > The packages that don't contain any test files import a Kafka package that > links librdkafka and uses Cgo. > When I

Re: [go-nuts] go test looking for a C library when the package actually does not contain any test files

2017-09-13 Thread Ondřej Kupka
Hmm, that sucks for my use case, but at least I know now that it's a feature. Cheers, Ondřej On st 13. 9. 2017 19:25 Ian Lance Taylor wrote: > On Wed, Sep 13, 2017 at 9:06 AM, Ondřej Kupka wrote: > > > > I am running go test on a set of packages. Some of

[go-nuts] "html/dom" alternative to html/template for true separation of concerns?

2017-09-13 Thread karv . prime
Hello, I only recently found my way to go. I'm a (former?) fullstack web-dev and as I ran into a PHP related problem (DOMDocument not working with HTML5 tags, I'd choose another solution stack if the language wouldn't be a fixed point in history) I was looking if Go already has a good way to

Re: [go-nuts] "html/dom" alternative to html/template for true separation of concerns?

2017-09-13 Thread Andy Balholm
It sounds like what you’re wanting to do is basically what is called Template Animation at http://www.workingsoftware.com.au/page/Your_templating_engine_sucks_and_everything_you_have_ever_written_is_spaghetti_code_yes_you

[go-nuts] Re: locking memory pages

2017-09-13 Thread Ganesh Sangle
Thanks for hint. I forgot to add i added a goroutine that does debug.FreeOSMemory() every 30 seconds. The RES size reported by PX does not go down, despite the fact that both gc and scvg reporting memory being freed. On Wednesday, September 13, 2017 at 5:20:06 AM UTC-7, edu...@kobemail.com

[go-nuts] Re: "html/dom" alternative to html/template for true separation of concerns?

2017-09-13 Thread Egon
If you want to manipulate HTML files then there is https://godoc.org/golang.org/x/net/html, but it comes with all the dangers of potential injection attacks and so on... which "html/template" avoids. Writing something that injects into the specific nodes and afterwards encodes shouldn't be a

Re: [go-nuts] Re: Choosing a framework

2017-09-13 Thread woosley. xu.
Personally when I started my project I chose to use a framework. I think it is ok to start with frameworks as long as you know what framework should do, what key concepts should be handled when dealing with Web app. Maybe Go provides all those solutions with standard pkgs, but if a framework can

Re: [go-nuts] "html/dom" alternative to html/template for true separation of concerns?

2017-09-13 Thread Karv Prime
Thank you for the heads up. So it is completely impractical for the needed purpose. In that case it would be truly bad. That's why user input should always be checked. Such a blogpost shouldn't even come that far. ^^ Either it's escaped before it gets to the database (not truly necessary due

[go-nuts] Re: Choosing a framework

2017-09-13 Thread Vikram Rawat
> > I am trying to learn golang too. and I have never ever build a website. > All the experience that I have is by building SHINY R dashboards.I tried > almost all the framework. But I liked REVEL. Because speed and concurrency > is not my concern I just want to write simple database web

[go-nuts] Re: "html/dom" alternative to html/template for true separation of concerns?

2017-09-13 Thread Egon
On Thursday, 14 September 2017 00:11:11 UTC+3, Karv Prime wrote: > > I don't know why it's unclear, what I'm proposing, but I'll try a 2nd time: > The devil is in the details :), but this makes it clearer. I just had few different ideas floating around in my head that could fit the first

Re: [go-nuts] "html/dom" alternative to html/template for true separation of concerns?

2017-09-13 Thread Egon
On Thursday, 14 September 2017 02:40:41 UTC+3, Karv Prime wrote: > > Thank you for the heads up. So it is completely impractical for the needed > purpose. > > In that case it would be truly bad. That's why user input should always be > checked. Such a blogpost shouldn't even come that far. ^^

Re: [go-nuts] "html/dom" alternative to html/template for true separation of concerns?

2017-09-13 Thread Andy Balholm
Why does automatic escaping make html/template completely impractical? (Or did I guess the antecedent of “it” incorrectly?) Andy > On Sep 13, 2017, at 4:30 PM, Karv Prime wrote: > > Thank you for the heads up. So it is completely impractical for the needed > purpose. >

Re: [go-nuts] "html/dom" alternative to html/template for true separation of concerns?

2017-09-13 Thread Karv Prime
It = html/template "The purpose" = the one I thought I could use it for and described above. Am Donnerstag, 14. September 2017 03:58:02 UTC+2 schrieb Andy Balholm: > > Why does automatic escaping make html/template completely impractical? (Or > did I guess the antecedent of “it” incorrectly?) >

[go-nuts] Re: "html/dom" alternative to html/template for true separation of concerns?

2017-09-13 Thread karv . prime
I don't know why it's unclear, what I'm proposing, but I'll try a 2nd time: Something similar to: http://php.net/manual/en/book.dom.php Or, even simpler: - Find Tags, IDs, Classes, etc. in an HTML document. - Something similar to Element.innerHTML to put content into these tags

Re: [go-nuts] "html/dom" alternative to html/template for true separation of concerns?

2017-09-13 Thread Andy Balholm
You may not be aware that the html/template package does automatic escaping. So if a template has {{.Blogpost}} and Blogpost contains alert(“Pwned”), the result will be something like scriptalert(Pwned)/script Assigning to the div’s innerHTML would be bad in this case, but appending a text

Re: [go-nuts] if condition in html template

2017-09-13 Thread Simon Ritchie
I suggest that you use the Model View Controller pattern, which is to say, you do all the data processing in Go and use your HTML template only to display the result. For example in your Go driver program, simply create a set of strings. to be displayed. For a successful backup, the string

[go-nuts] Re: locking memory pages

2017-09-13 Thread eduard
Take a look on this post: https://medium.com/samsara-engineering/running-go-on-low-memory-devices-536e1ca2fe8f and function https://golang.org/pkg/runtime/debug/#FreeOSMemory to reduce RSS of the process. HTH, Eduard среда, 13 сентября 2017 г., 0:18:50 UTC+3 пользователь Ganesh Sangle написал: