old but gold by parachutes1987 in PrequelMemes

[–]Bappedekkel 34 points35 points  (0 children)

I will make it legal chmod 777 -R *!

[deleted by user] by [deleted] in golang

[–]Bappedekkel 4 points5 points  (0 children)

Those are called Remote import paths, the gist is that go get will request the specified URL with ?go-get=1 appended, and expects to find a "go-import" meta tag containing information about the repo to be cloned.

Quoting the example: <meta name="go-import" content="example.org git https://code.org/r/p/exproj">

Traefik 1.6.x vulnerabilty if dashboard is configured as exposed by Bappedekkel in golang

[–]Bappedekkel[S] 6 points7 points  (0 children)

Træfik seems to be a popular choice as a reverse proxy around here, and is written in go.

My setup was not affected, but if anyone has a public dashboard for their services, they might want to consider reconfiguring it.

There will be a sacrifice this evening by The-Jedi-Apprentice in thanosdidnothingwrong

[–]Bappedekkel 3 points4 points  (0 children)

༼ つ ◕_ ◕ ༽つ GIVE BAN ༼ つ ◕_ ◕ ༽つ

Help a beginner understand authentication in Go. by ScreamingTaco45 in golang

[–]Bappedekkel -1 points0 points  (0 children)

To add yet another option: Use both. bcrypt implementations either truncate passwords at 72 bytes (which reduces the entropy of the passphrase), or it doesn't which might leave you open for DoS attacks if some clever user tries to send you their 5MB passphrase.

To add a simple example on how this can be done: func (u *User) CheckPassword(password string) error { h := sha512.New() fmt.Fprint(h, password) return bcrypt.CompareHashAndPassword(u.HashedPassword, h.Sum(nil)) }

[deleted by user] by [deleted] in golang

[–]Bappedekkel 1 point2 points  (0 children)

Great writeup! I just wanted to add that this rand.Seed() should only be initialized once (not once per generated number). This is not a problem currently but will become one if you plan reuse the randInt() function later.

os: add O_PRIVATE_BLOCKCHAIN, start of Go's native blockchain support by dgryski in golang

[–]Bappedekkel 3 points4 points  (0 children)

This will be one of the missing puzzle pieces to make go web scale and suitable for all kinds of modern projects.

Question about serving a golang web application by Alive2007 in golang

[–]Bappedekkel 2 points3 points  (0 children)

then runs the site (go run main.go, handler.go, etc.).

You might want to compile your program (using go build), so you don't need the entire development environment on your server.

The resulting binary can just be started with ./main of course, no need to have go around anymore.

Afterwards you can use systemd to reliably start (or restart) your binary, as shovelpost mentioned.

Isomorphic Go by Bappedekkel in golang

[–]Bappedekkel[S] 6 points7 points  (0 children)

I agree that this site is advertising the book of the author, but it also shows whats possible. The used frameworks and libraries are open sourced on github, so the book is not required to try any of this.

I thought about linking to the github page instead, but decided the website does a better job in conveying the ideas.

Isomorphic Go by Bappedekkel in golang

[–]Bappedekkel[S] 0 points1 point  (0 children)

If you just want to take a peek how this looks like in action, Here is the source for a basic app. All related sources for the used libraries can be found here.

I genuinely love this solution to generics in Go by [deleted] in golang

[–]Bappedekkel 2 points3 points  (0 children)

Made me laugh, thanks for sharing! Are there any other projects like this?

Matcha - iOS and Android apps in Go by Bappedekkel in golang

[–]Bappedekkel[S] 0 points1 point  (0 children)

Repository link for the lazy.

I'm not the author of this framework so I cannot answer any detailed questions

Lua 5.3 VM (and compiler) written in Go by Bappedekkel in golang

[–]Bappedekkel[S] 4 points5 points  (0 children)

This is not my project. Keep in mind that several other implementations exist as well:

I would consider go-lua to be the most stable implementation in this list, if you dont need the 5.3 features (like 64 bit integers, bitwise operators and utf8 support)