GoLang Troubles?

So, it’s been a few days and have had quite the ride trying to understand what’s happening on the backend of the env. So, in my full admission, I made an oopsie in the last post regarding adding Go to your PATH.

I ran into an issue Friday (06/09, (it’…


This content originally appeared on DEV Community and was authored by Jorden Williams

So, it's been a few days and have had quite the ride trying to understand what's happening on the backend of the env. So, in my full admission, I made an oopsie in the last post regarding adding Go to your PATH.

I ran into an issue Friday (06/09, (it's always right before the week ends). I reached out to the developer of templ, a-h (huge thanks for pointing me in the right direction), with an issue about my css file being overwritten.

According to everything sent, all was okay. After a couple of days working on it. The issue became clear. My PATH was corrupted. How did I come to this conclusion?

templ generate: command not found

The issue, is not in the way PATH is set up but the ORDER in which it is set up.

Coming from Windie, over to Mac, I didn't consider a key and important aspect. When working in Windie, PATH can be deleted completely if not set correctly (typically can be reset by restarting the PC). On Linux based systems, this is less of a risk when working in the terminal.

"But how?" I hear. Simple, when working in the terminal, your $PATH is loaded into the env. So, by simply changing the code to look like so:

GOPATH=/path/to/go
GOBIN="$GOPATH/bin"

export PATH="$GOBIN:${PATH}"

we resolve the issue.

By appending $PATH to the end of the string, you're preventing duplicate paths. This was, in fact, the issue. Remember what I said last time? "If you run into any problems, I promise, it is mostly a path issue."

Good luck with your project(s) and may you have full bands ahead!

(If you're unsure of what "full bands" means, I have a post for that, coming as well)


This content originally appeared on DEV Community and was authored by Jorden Williams


Print Share Comment Cite Upload Translate Updates
APA

Jorden Williams | Sciencx (2024-09-08T13:22:47+00:00) GoLang Troubles?. Retrieved from https://www.scien.cx/2024/09/08/golang-troubles/

MLA
" » GoLang Troubles?." Jorden Williams | Sciencx - Sunday September 8, 2024, https://www.scien.cx/2024/09/08/golang-troubles/
HARVARD
Jorden Williams | Sciencx Sunday September 8, 2024 » GoLang Troubles?., viewed ,<https://www.scien.cx/2024/09/08/golang-troubles/>
VANCOUVER
Jorden Williams | Sciencx - » GoLang Troubles?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/09/08/golang-troubles/
CHICAGO
" » GoLang Troubles?." Jorden Williams | Sciencx - Accessed . https://www.scien.cx/2024/09/08/golang-troubles/
IEEE
" » GoLang Troubles?." Jorden Williams | Sciencx [Online]. Available: https://www.scien.cx/2024/09/08/golang-troubles/. [Accessed: ]
rf:citation
» GoLang Troubles? | Jorden Williams | Sciencx | https://www.scien.cx/2024/09/08/golang-troubles/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.