[go-nuts] Re: Unable to represent a file data type

2020-09-08 Thread Ronny Bangsund
On Tuesday, September 8, 2020 at 7:44:33 PM UTC+2, Qali Fah wrote: > > The problems i'm having are how i would represent the artwork(picture > file) and song (music file) in gorm (Golang ORM library) and in what format > do i return it to the client after being stored and are there external >

[go-nuts] Re: Is it necessary to start function names within main package with capitalized letter?

2020-06-24 Thread Ronny Bangsund
I tend to do it too, because at some point I often find that I might as well create packages (internal or not) from some of the functionality. For example, my latest little tool wraps some AWS functionality with pretty-printing and progress bars, and I suspect I may find use for those in other

[go-nuts] Re: For a .net developer,how long it takes to learn go completely?

2020-06-11 Thread Ronny Bangsund
I'd say the more C-like languages you know, the easier it is to become fluent in Go. If you've already gotten used to switching between the likes of C, C++, C#, Java and more, you're likely to have fewer wrong assumptions about Go. Getting over the error handling verbosity is the major first

Re: [go-nuts] Re: gzip.Reader.Read does not fill the given buffer

2020-06-10 Thread Ronny Bangsund
Reading in small chunks is handy for progress displays too. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view

[go-nuts] Re: gzip.Reader.Read does not fill the given buffer

2020-06-09 Thread Ronny Bangsund
On Tuesday, June 9, 2020 at 4:05:38 PM UTC+2, Amit Lavon wrote: > > I am reading raw bytes from a gzip input. I found that it only reads up to > chunks of 2^15 even though there is more data to be read. > > Is that the intended behavior? I expected whatever internal buffering it > may have to be

[go-nuts] Re: How to work with multiple environment like dev, test, staging, prod in golang ?

2020-05-19 Thread Ronny Bangsund
On Sunday, May 17, 2020 at 7:19:23 PM UTC+2, Shishira Pradhan wrote: > > In springboot, we have configuration like port, database etc info are > stored in yaml files like application-dev.yml, application-test.yml, > application-prod.yml profiles, and profile name is passed during running >

[go-nuts] Re: go run requires internet connection?

2020-04-09 Thread Ronny Bangsund
On Thursday, April 9, 2020 at 1:01:31 PM UTC+2, Tanmay Das wrote: > > Running the executable: `./helloworld` > Maybe there's a log entry for your program specifically in Console (the GUI collecting macOS logs), or in one of the system logs. If this is somehow related to GateKeeper, you could

Re: [go-nuts] Is it possible to build Linux executables on Windows with lxn/walk?

2020-04-08 Thread Ronny Bangsund
On Thursday, April 9, 2020 at 6:03:24 AM UTC+2, 洪嘉鴻 wrote: > > Excuse me. > Did you mean this ? > Thank you very much! > Yes, that's the one, Docs at https://fyne.io and the cross-builder/packager at https://github.com/lucor/fyne-cross. -- You received this

Re: [go-nuts] Is it possible to build Linux executables on Windows with lxn/walk?

2020-04-08 Thread Ronny Bangsund
On Thursday, April 9, 2020 at 5:01:02 AM UTC+2, 洪嘉鴻 wrote: > > I want to run executables on both Windows and Linux. > I don't think it is convenient to maintain 2 codes with lxn/walk on > Windows and go-gtk3 on Linux. > Yeah, it gets messy quickly. It can be done, but then you're probably

Re: [go-nuts] How to execute a command using root?

2019-08-31 Thread Ronny Bangsund
On Saturday, August 31, 2019 at 3:14:28 PM UTC+2, Jakob Borg wrote: > > On 31 Aug 2019, at 12:33, Ronny Bangsund > wrote: > > > Digging through my vast mess of code, I found this function which sets the > real and effective user (Setreuid) of the calling process: >

Re: [go-nuts] How to execute a command using root?

2019-08-31 Thread Ronny Bangsund
On Saturday, August 31, 2019 at 10:07:59 AM UTC+2, Chris Burkert wrote: > > is there some code available to dig into that? I plan to do something > similar that a regular user process starts up a kind of a root broker which > starts several other processes as different users. > You would by

Re: [go-nuts] Goroutine scheduled 10 seconds too late

2019-08-23 Thread Ronny Bangsund
On Friday, August 23, 2019 at 5:58:44 PM UTC+2, Michael Andersen wrote: > > It can take a while to reproduce, so it might be a week or so before I > have the results. > Can you think of ways to cause the same memory pressure quicker? Mocking data, running the functions the number of times they

[go-nuts] Re: Need help to learn go lang

2019-07-19 Thread Ronny Bangsund
Brian's list is good. I started with the tour and picked relatively simple tools I wanted to write, then looked up what I needed as projects advanced. My list of GitHub Go projects is getting unwieldy now, a few years later. It's an addiction. Just start with simple projects and set some

[go-nuts] Re: Project Layout Question

2019-06-11 Thread Ronny Bangsund
On Tuesday, June 11, 2019 at 2:47:44 PM UTC+2, Boris Mühmer wrote: > > Is the project layout total rubbish? > I'm not sure - all I know is that it's different from how I prefer it, and "pkg" is the one thing I frequently see people dislike ;) If you want to share packages, parent them to the

[go-nuts] Re: Go will shine on huge web projects, but how about simple ones?

2019-06-07 Thread Ronny Bangsund
Yes, the built-in is pretty awful in many ways. There are fortunately lots of alternatives, all with roughly an order of magnitude better performance. I inspected this list yesterday to finally make a choice of packages to use: https://github.com/smallnest/go-web-framework-benchmark I ended up

Re: [go-nuts] Go+ replacement

2019-04-24 Thread Ronny Bangsund
I occasionally read this list, and sometimes I stop by the Go Slack. There are many channels there, and the general one might actually be the least interesting to many. I mostly follow the VSCode discussions/live help channel, and sometimes there's activity in other project-specific or

[go-nuts] Re: binary protocols code generators (parser/writer/validator/[de]serializer)

2019-01-14 Thread Ronny Bangsund
Protocol Buffers springs to mind. It's a compact binary protocol with predefined field order, allowing you to skip unused fields and maintain backwards compatibility. You could probably use it as a storage format too. It's not in the Lex/Yacc territory, but it DOES generate all the code you

[go-nuts] Re: Unix binary installations for Go

2018-12-14 Thread Ronny Bangsund
Which Unix/derivative? The great thing about them is that they have so many standards to choose from ;) "go build" isn't sufficient for most of my projects, if I want proper distribution of binaries. I might use "go generate" to create some data/source a program depends on, and I always embed

Re: [go-nuts] Re: need library suggestions on writing a record program

2016-11-29 Thread Ronny Bangsund
On Tuesday, November 29, 2016 at 7:11:57 AM UTC+1, bia...@gmail.com wrote: > > I've been wondering how I should setup input fields. should termbox be > responsible for it? or termui as you suggested (this seems more for > monitoring...) or even gocui? > I've tested termui and GOCUI

[go-nuts] Re: Golang should have a center packages index hosting like npm, rust crates

2016-10-21 Thread Ronny Bangsund
On Thursday, October 20, 2016 at 5:45:03 AM UTC-0:8, zixu mo wrote: > > Golang should have a center packages index hosting like npm, rust crates. > It seems some posters didn't notice the distinction you made there ;) The OP asked about an *index*, not a central repository. It would basically be