6 ms·
> I just wanna pull in a JS file from `go build` via `go:embed` and have it work lol. I'm not doing rocket science here, I just want thing to go. If it is not l
by KrishnaShripad 5y ago
> I just wanna pull in a JS file from `go build` via `go:embed` and have it work lol. I'm not doing rocket science here, I just want thing to go. If it is not less effort than putting static files into a binary then I'm sorry but you've lost me.
Why would I want to put JS/static files inside a binary? Sounds like too much effort to do something as simple as hosting the files directly.
There is literally no need to put things in a binary if all you have to do is host a static website. Some services (like Netlify Drop [1]) just let you drop your entire folder with your static files and you get a URL in the end which you can share with anyone you like. Why would I go through the hassle of creating a binary (which is way more complicated) than just dropping a folder into a service like Netlify Drop [1]?
I am just giving an example of right service/tooling trumping complicated binary builds.
[1]: https://app.netlify.com/drop https://app.netlify.com/drop
- neetle 5y agoHow is "go build ." and scp more complex than managing an integration with a 3rd party using a proprietary API
- KrishnaShripad 5y ago> How is "go build ." and scp more complex You have to define what do you mean by "complex". For starters, you don't need go build or scp at all. > managing an integration with a 3rd party using a proprietary API Nothing to "manage" really. You just drag and drop your static files. There are no API calls, no handling exceptions or debugging build errors. Everything is automated for you. If the 3rd party goes down for whatever reason, you can always host it on your own or on any other 3rd party competing services (which there are now plenty of that follow similar model). Either ways, web hosting inherently is hosting on a 3rd party. It is literally impossible to host everything on your own without any sort of dependency on something: even if you buy your own physical server rack, you still are dependent on electricity provided by your Government, your internet service provider giving you uninterrupted connectivity, DNS for resolving your domain, your domain registrar etc. There is always going to be some 3rd party dependency. Whether you like it or not. If this makes you uncomfortable, just confine to developing standalone apps. You are trying to define complexity in an inherently dynamic environment that web apps run in.