Shameless plug: I am the author.

116 points

Golang puts shit specifically in $HOME/go. Not even .go. Just plain go.

Why is it so difficult to follow industry standards

permalink
report
reply
25 points

That’s what happens when you don’t set $GOPATH I think

permalink
report
parent
reply
52 points

That doesn’t make it better.

permalink
report
parent
reply
9 points

It makes it insofar better to me that you have the option to change it. You can’t change Mozilla programs to use anything but .mozilla (apart from modifying the source code of course) so for me seeing the folder is at least a way of telling me that the variable is unset.

The better question is which folder is suited the best to store the stuff that goes into $GOPATH

permalink
report
parent
reply
20 points

Of course, but that’s not the point. There should be a sane default, and there isn’t one

permalink
report
parent
reply
13 points
*

Go pisses me off with that. I separate projects the way I want but go wants every project written in go in one big directory?

permalink
report
parent
reply
2 points

I really didn’t like this either. It’s quite surprising, because the rest of Go tooling is quite nice. Not having a venv, or at least something like pnpm-style node_modules is weird

permalink
report
parent
reply
1 point

Why would go have a virtual environment or dep tree like node_modules equivalent, it’s not interpreted or dynamically linked.

With modules, dependencies can be vendored.

permalink
report
parent
reply
6 points

Google

following industry standards

pick one

permalink
report
parent
reply
1 point

This post literally links to the leading one.

permalink
report
parent
reply
5 points

off the shelf go was too annoying for me

Nowadays I set GOENV_ROOT to an XDG location and use goenv instead.

permalink
report
parent
reply
-1 points
Deleted by creator
permalink
report
parent
reply
15 points

What I want in $HOME are the following directories:

If I’m on a GUI-based environment:

  • Desktop
  • Documents
  • Downloads

In general:

  • .local
  • my_junk_folder_i_made

I’d like everything else to live within something like ~/.local thanks

permalink
report
parent
reply
8 points
*

Maybe Linux should have .local and .roaming folders like Windows. local = only useful on this system, roaming = good to sync across systems. Config would be in .roaming if it’s not machine-specific.

permalink
report
parent
reply
69 points

Shout out to xdg-ninja - it’ll find files that are in your home and suggest how to configure the app to use XDG instead. https://github.com/b3nj5m1n/xdg-ninja

permalink
report
reply
10 points

Strange that some apps allow configuring it rather than just doing it automatically…

permalink
report
parent
reply
1 point

That’s the usual open source way. The config probably came later so they just added the option without changing the default because that would break backward compatibility.

And there would be too much boring work to build a migration.

permalink
report
parent
reply
2 points

Thanks, I hadn’t heard of that. Time to add a few hundred lines to my dotfiles :)

permalink
report
parent
reply
1 point

After running it and properly configure the paths I once again came to the conclusion: I fucking hate Google.

permalink
report
parent
reply
51 points

I wish they used them all, especially XDG_CACHE_HOME which can become pretty big pretty fast.

permalink
report
reply
12 points

And i wish there was a separate XDG_LOG_HOME or $HOME/.local/log, with logrotate preconfigured to look there.

permalink
report
parent
reply
2 points

Or $HOME/.var/log.

permalink
report
parent
reply
37 points
*

100% agree and I also despise devs who do this on windows, instead of using %appdata% they’re using c:\users\username\.myappisimportantandtotallydeservesthisdir

permalink
report
reply
10 points

I have to use a separate Documents folder for my actual documents lol

permalink
report
parent
reply
3 points

Not to mention - this isn’t necessarily the correct place for Windows anyway. That is exactly why they standardized stuff around Vista.

Plus - what about apps that store an ungodly amount data in there? Personally, I only keep the OS and basic app data (such as configs and cache) on the partition and nothing else.

Then something like Minecraft comes along and it’s like “humpty dumpty I’m crapping a lumpty” and stores all its data in “.minecraft” right there in your user directory.

Then you gotta symlink stuff around and it becomes a mess…

permalink
report
parent
reply
3 points

I think that also causes issues for roaming profiles and folder redirection. If roaming is turned on then everything in the %appdata%\roaming folder is synced to a server. %AppData%\Local is not. So if your app is using %AppData%\Roaming for temporary data then you are causing a whole bunch on unnecessary IO. Same for using Documents since that if often synced.

permalink
report
parent
reply
1 point

To be fair here, appdata is technically a hidden folder and there are lots of reasons an app would want it’s data accessable by the user.

permalink
report
parent
reply
8 points

Yes but then just spam the documents folder like anyone else, don’t hoard the home root for no reason except that is a lazy cross platform port

permalink
report
parent
reply
28 points

I didn’t know about this (and thankfully, haven’t written anything public). I’ve been trying to fix an install script for an OSS project that doesn’t work on immutable distros, and using the XDG Base Directory specs might just be the panacea I was looking for!

permalink
report
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 6.7K

    Monthly active users

  • 6.6K

    Posts

  • 180K

    Comments