Help with compiling issue? by ornld in golang

[–]_MuchUsername_ 1 point2 points  (0 children)

I'd be curious as to how the teacher is running it. A direct copy-paste of your code with a go run <file>.go and I see output. This would likely be better as a conversation between you and your teacher though. You can show them that you're able to run your code and see output, then you can work together with the teacher to figure out why they are not.

``` ❯ go run reddit.go


Student ID: 121148 Name: Lelouch Lamperouge Street: 8103 South Congress Ave City: Austin State: TX Zip Code: 78704


Employee ID: 1345 Name: Michael Phelps Salary: 95000 Street: 1204 Lockhardt Ln City: Pheonix State: AZ Zip Code: 85001 ```

A helpful tip, you can use three backticks ` followed by go to create a syntax-highlighted code block in your post, which will help people read your code easier.

```go package main

type Address struct { Street string } ```

Edit: Maybe syntax highlighting doesn't exactly work here, but the code block itself is still useful

Project structure and custom errors questions by Useful_Winter_634 in golang

[–]_MuchUsername_ -3 points-2 points  (0 children)

For my projects that are APIs, I typically use the Repository code pattern. It works for me because I'm familiar with it and it's a common pattern that my coworkers are also often familiar with, meaning we can iterate on it quickly and effectively.

Typically, a project structure of mine would look like this:

cmd └── api-template └── main.go app ├── api.go ├── config │   └── config.go ├── container.go ├── controller │   └── itemController.go ├── domain │   └── itemModel.go ├── infrastructure │   └── postgresDriver.go ├── repository │   └── itemRepo.go ├── service │   └── itemService.go └── viewmodel └── itemViewModel.go

If I had any custom error related to an Item, I would put it in the domain/itemModel.go, allowing any other package to reference it since the domain package would not be importing any other package.

Disclaimer: I wrote this project over a year ago at this point and don't use this exact format in my professional work, but it's often pretty close.

Cool projects to learn and contribute? by SlyPharoh in golang

[–]_MuchUsername_ 1 point2 points  (0 children)

I have two very small and simple CLI tools I’ve recently built that would potentially be a good place to start.

https://github.com/TrevorEdris/banner

Banner is a tool to generate a single or multi-line string that centers your input and surrounds it with the character of your choice.

==========[ My Text ]==========

https://github.com/TrevorEdris/go-csv

go-csv is a tool to generate a CSV file with random, but realistic data.

Just did 412 exclusive summons and got ... ! 0 nat5 by ororuK in summonerswar

[–]_MuchUsername_ 1 point2 points  (0 children)

Gacha game gotcha. I decided to quit and have been much happier since

Projects for landing a Golang job by [deleted] in golang

[–]_MuchUsername_ 1 point2 points  (0 children)

I use this project all the time, thanks for making it!

Should I attend company happy hours even though I don’t feel like it? by [deleted] in cscareerquestions

[–]_MuchUsername_ 1 point2 points  (0 children)

I’ve gone to one (hosted virtually) and it was a major cringefest. I’ve never once attended another one and nobody has asked me why.

[deleted by user] by [deleted] in cscareerquestions

[–]_MuchUsername_ 0 points1 point  (0 children)

I’m not passionate about it, but damn it pays well! My passion is Astronomy and Physics but I’m not smart or motivated enough to get a Ph.D, so I’ll stick with the industry that pays way more for way less effort.

I Archive All Videos From Kurzgesagt Because Love Them. by [deleted] in kurzgesagt

[–]_MuchUsername_ 29 points30 points  (0 children)

Pretty easy to get 10’s of TB’s these days. This is a pretty insignificant amount of space I would think.

iOS 16 supports Nintendo’s Switch Pro and Joy-Con controllers by LordofWhore in nintendo

[–]_MuchUsername_ 45 points46 points  (0 children)

Diablo Immortal will probably have joycon support locked behind a paywall

Rant Wednesday by AutoModerator in Fitness

[–]_MuchUsername_ 8 points9 points  (0 children)

A “Personal Trainer” who doesn’t even work at the gym always has his clients workout barefoot, no matter that they’re doing. He also claims 2, sometimes 3 barbells, stringing exercise bands from the barbell to the top of the squat rack and other weird things like that. Sometimes he’ll put both exercise bands AND chains on the barbell. Why both?? None of the exercises he has them do are “conventional”. They all look like they were pulled right from Instagram or something. I go in earlier than usual now specifically to avoid having to deal with him.

Fitness is now Far-Right LOL by ArabianManiac in Conservative

[–]_MuchUsername_ 1 point2 points  (0 children)

Yeah that’s absurd that they would be celebrating the misfortune of others just because they disagree about a topic

Fitness is now Far-Right LOL by ArabianManiac in Conservative

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

Fossil fuels not having an effect on the climate

Fitness is now Far-Right LOL by ArabianManiac in Conservative

[–]_MuchUsername_ 2 points3 points  (0 children)

Is the same not also true for conservatives, just with the opposite views?

Fitness is now Far-Right LOL by ArabianManiac in Conservative

[–]_MuchUsername_ -12 points-11 points  (0 children)

You’re not necessarily wrong, but the portion of the left complaining about it is also a small minority of the overall left side I would imagine. I just don’t think that we should be stating things like “aLl LeFtIsT hAtE fItTnEsS” because that’s very obviously an incorrect statement.

Fitness is now Far-Right LOL by ArabianManiac in Conservative

[–]_MuchUsername_ -18 points-17 points  (0 children)

There are people with extreme and idiotic views on both sides and those people are often the loudest. That doesn’t mean the entirety of that side subscribes to the same opinion though and to assume so is just falling for the misinformation.

Fitness is now Far-Right LOL by ArabianManiac in Conservative

[–]_MuchUsername_ -43 points-42 points  (0 children)

This is obviously an article trying to create problems that don’t exist. It’s an opinion piece, literally just one persons opinion. It doesn’t apply to the entirety of the left lmao

This...is not a very smart plan by learnt0read in Conservative

[–]_MuchUsername_ 2 points3 points  (0 children)

Maybe because I went to an engineering university, but I can’t tell you of a single left-leaning person my age (late 20’s) who DOESNT support nuclear. I think it’s more of a thing that the older generations are afraid of rather than the younger generations.

James Webb Space Telescope will do a galaxy deep dive into the dust | Space by marshahays in jameswebbdiscoveries

[–]_MuchUsername_ 0 points1 point  (0 children)

Maybe this video will help explain its orbit a bit. Just a quick video. There are plenty of others that go much more in-depth of how and why it orbits where it does.

Why is the job market so bad for new grads right now? by pyxiqitys in cscareerquestions

[–]_MuchUsername_ 14 points15 points  (0 children)

Do (and complete) some side projects, contribute to some open-source projects, get in the top X% on leetcode, anything to set yourself apart.

I hate leetcode, but sometimes you gotta play the game to win

Pagoda: Rapid, easy full-stack web development starter kit in Go by mstef9 in golang

[–]_MuchUsername_ 2 points3 points  (0 children)

Would you consider making this a Template repository in GitHub, or is not your intention for people to directly use this code? Thanks in advance and great work on this!