Using local computer file explorer during runtime

Over the weekend I decided to take the plunge and learn Go to build a desktop application. I had used Electronjs briefly before but Go seems much better for my purposes.

As per my learning style, I like to have a problem to solve first and this generally means I get stuck somewhere along the way while grappling with the basics.

So, my simple objective is to have a program which allows the user to select a file on their computer for the go program to read and process the data in order to spit out an answer.

I had a glance through “Packages” on the golang.org website and could not find anything obvious that will get my application to open up file explorer (I’m using windows 10) in order for the user to select the file (it would be nice for the go application to also define the file type).

I found some stuff online via github, but as I was not sure if this is taking me on a different pathway.

So, any advice greatly appreciated.

Thanks

Hi, I think you would need a Windows API wrapper. For example https://github.com/JamesHovious/w32

1 Like

Integrating with windows sounds like a very hard problem to begin with.
I would choose a different problem which does not involve any platform specific features.

I’ve been reviewing the windows api wrapper I think you might be right. This is more involved than I expected.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.