Go programming language discussion

1382 readers
1 users here now

founded 6 years ago
MODERATORS
51
 
 

hi there,

I've just cut odt@v0.1.0, an OpenOffice document parser, "automatically" generated from the RelaxNG specification document.

odt also provides odt2md, a command that tries its best to convert an ODT file into a CommonMark one.

$> go install sbinet.org/x/odt/cmd/odt2md@latest
$> odt2md -h
odt2md converts an ODT document into a CommonMark one.

Usage: odt2md [OPTIONS] [INPUT.odt]

Example:

 $> odt2md input.odt
 $> odt2md input.odt > out.md
 $> odt2md -o out.md input.odt
 $> odt2md < input.odt > out.md
 $> odt2md -o out.md < input.odt

Options:
  -o string
    	path to output CommonMark file

$> odt2md ./testdata/simple.odt

# Title

Hello World!

52
 
 

Go 1.21 release candidate is available.

It has some interesting changes in my opinion:

  • clear() for clearing maps
  • new slices package for common operations on slices
  • new maps package for cloning and comparing maps

And some somewhat interesting ones:

  • min/max function directly in the language without a package (could have easily been in math package, but then again, you can min/max strings with this?)
  • structured logging package

Some other optimizations and improvements.

What do you think?

53
 
 

I'm trying to find a bson struct tag to create a unique index just like the one in the image attached to this post but for mongodb. i tried searching and i found nothing Close to what i need but this stackoverflow post https://stackoverflow.com/questions/30831316/how-to-specify-a-struct-with-a-multi-column-unique-index-for-gorm

54
 
 

I find it kinda odd that github.com/gorilla/websocket, which is deprecated and the repo is in archive mode, is still the most popular library for websockets.

Case in point: go.elara.ws/go-lemmy

I'm not saying this is inherently bad, I just wonder why that is.

I guess the most common last words are "How hard could it be?", but why is nobody rolling their own?

55
 
 

We use this for Lemmy.

56
 
 

Anybody has any spicy neovim configs to share for golang development.

I'm just missing GoFmt and GoImports to run on save.

Thanks!

57
58
 
 

Can anyone get this working on Ubuntu 22.04?

I installed go1.20.5 on my system, did "make", and configured it for leemy.ml with my username and password - but it is not working. No errors that I see.

59
60
3
submitted 2 years ago* (last edited 2 years ago) by whou@lemmy.ml to c/golang@lemmy.ml
 
 

Every time I come across a !golang post I feel like a proper icon is missing.

I mean, why not? Other programming communities already have theirs, and, in my opinion, we have the best and cutest mascot of them all, so why not use it?

I would propose we use the classic standing gopher. There is a free gophers collection as well. Both are licensed under Creative Commons 3.0 and CC0, respectively.

@gregf@lemmy.ml and @rek2@lemmy.ml, any thoughts on this?

61
62
 
 

Are there any projects or project ideas to do once i learn the basics of GO?

63
64
65
66
67
68
69
70
 
 

cross-posted from: https://lemmy.ml/post/171118

On the account that "we are better equipped", Go will now ignore the order of the CipherSuite option, starting with Go 1.18, due this month.

The sorting logic is detailed in the code.

Several choices seem strange to me:

  • "SHA-256 variants of the CBC ciphersuites don't implement any Lucky13 countermeasures." leading to CBC-SHA1 being favored over CBC-SHA256.
  • "AES comes before ChaCha20", on the account that AES-NI is faster. They use heuristics to determine whether both ends support AES-NI and whether to prefer ChaCha20 over AES.
  • "AES-128 comes before AES-256", on the account that AES-256 is slower.

The static nature of the sorting algorithm also leads to security conundrums such as the fact that updating the Go library and recompiling programs will be required if a vulnerability is found in an algorithm implementation (e.g. Lucky13 for the CBC-SHA256 Go implementation); you won't be able to just reduce its priority by updating a config file.

What's your take on this? Can you explain some of the choices that feel strange to me?

71
72
 
 

I read in the news that Peter Bourgon was officially excommunicated from Go "community spaces". I'm curious if this community space, !golang@lemmy.ml, plans to comply with the ban. I think it would be useful to identify and support spaces that will not carry it out.

73
 
 

cross-posted from: https://lemmy.ml/post/77351

Join the FedeProxy vidcall and help bring Gitea to the Fediverse

Whether you are technical or not, there's many ways you can help. By doing so you'll contribute to offering real and open alternatives to the dominant position that Github has on the open source movement. Decentralized FOSS development on the Fediverse, no less!

Agenda:

  • Proofreading of grant proposal
  • Dev bounty: Generate gitea private keys
  • Find individuals & orgs to support grant application and/or federation in Gitea
  • Facts / articles that demonstrate the popularity of Gitea
  • Where to advertise the effort towards federation?
  • First grant application must be sent before October 1st, 2021 for the @NGIZero Discovery call

Provide your availability for the vidcall here: https://framadate.org/jO19mi38nMKWNYbt

Read these other Lemmy posts and learn how you can earn money now:

Additional information:

74
 
 

cross-posted from: https://lemmy.ml/post/73411

An opportunity for Golang devs to work on a great FOSS project with funding: Bringing Gitea to the Fediverse with ActivityPub support and the ForgeFed protocol..

75
view more: ‹ prev next ›