errcheck
kubernetes
errcheck | kubernetes | |
---|---|---|
9 | 661 | |
2,284 | 106,923 | |
- | 0.6% | |
6.3 | 10.0 | |
15 days ago | about 10 hours ago | |
Go | Go | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
errcheck
-
Linter to check for errors ignored with _
In our codebase I noticed a few cases where people ignored errors returned from functions by assigning them to _, ie result, _ := foo(). The errcheck linter doesn't seem to catch this, does anyone know of a linter that does?
-
Golang panics in libraries
And we also expect that the caller will check the error and handle it. There is a popular linter that checks it for us: errcheck.
-
Is it a bad convention to overwrite err variable?
You should be using golangci-lint, because all serious Go programmers should. golangci-lint contains errcheck, which will detect if you overwrite an error without having done something with it in the meantime. I consider this one of the most important linters (this doesn't just detect things that may sorta kinda someday turn into bugs, this quite likely is a bug RIGHT NOW), and it helps you have the confidence you can overwrite errors as you go and don't need to keep allocating new ones.
-
Integration Tests failing
Run golangci-lint over your code if you haven't already and pay special attention to errcheck's output.
-
Luciano Remes | Golang is 𝘼𝙡𝙢𝙤𝙨𝙩 Perfect
errcheck has a flag for that ;)
-
Proposal: Go 2: Lightweight anonymous function syntax
https://github.com/kisielk/errcheck, which is in most of the combined linter packages by default.
We'll agree to disagree about unused imports; imports have can side-effects.
-
Lies we tell ourselves to keep using Golang
I prefer functions returning errors over throwing exceptions. Whether it's Go's errors or ML-style options/results, they're both better than exceptions. I cannot remember the last time I had a bug from not checking an error in Go. There's also errcheck which I use as part of my linting that will catch unchecked errors, such that I cannot even commit the code.
-
I Want Off Mr. Golang's Wild Ride
> Go compiler raise an error if a variable (error) goes unused
It doesn't though. It's perfectly valid to not use the return value of a function that only returns an error, for instance.
There are static error checking tools you can use like https://github.com/kisielk/errcheck to work around this, but most people don't use them.
I've run into a lack of Go error checking many times. Many times it's just the trivial case, where the compiler doesn't warn about not checking the result of an error-returning function.
But often it'll be subtler, and the result of Go's API design. One example is its file writing API, which requires you to close the file and check its error to be correct. Many times people will just `defer file.Close()`, but that isn't good enough - you're ignoring the error there.
Worse still is e.g: writing to a file through a bufio.Writer. To be correct, you need to remember to flush the writer, check that error, then close the file and check that error. There's no type-level support to make sure you do that.
-
Trying Out Generics in Go
I'd be really happy with that! Building the functionality of errcheck[1] and ineffassign[2] into the compiler — or at the very least, into govet — would go a long way to allay my worries with Go.
I think the reason they don't do this is that it's a slight (albeit a very tiny one) against Go's philosophy of errors being values, just like any other. While the `error` type is standard and used throughout Go source code, it still just has a simple three-line definition[3] and is not treated as a special case anywhere else; there is nothing stopping you from returning your own error type if you wish. A third-party linter could simply check for the `error` type specifically, but the first-party tools should not, and there's nothing like Rust's `#[must_use]` attribute that could be used instead. I respect Go's philosophy, but I feel like pragmatism must win in this case.
[1]: https://github.com/kisielk/errcheck
kubernetes
-
Streamlining Deployments: Unveiling the Power of GitOps with Kubernetes
In the field of software development, efficiency and agility are always sought after. In the era of cloud-native apps, traditional deployment techniques—which are frequently laborious and prone to errors—are starting to become obstacles. This is when Kubernetes and GitOps come in handy.
- Presentación del Operador LMS Moodle
-
Introducing LMS Moodle Operator
Are you looking for a hassle-free way to deploy Moodle™ Learning Management Systems (LMS) on Kubernetes? Look no further! Krestomatio presents the LMS Moodle Operator, an open-source Kubernetes Operator designed to simplify the deployment and management of Moodle instances on Kubernetes clusters. Let's dive into what makes this tool a great choice for Moodle administrators and developers alike.
-
Using NetBird for Kubernetes Access
Securing access to your Kubernetes clusters is crucial as inadequate security measures can lead to unauthorized access and potential data breaches. However, navigating the complexities of Kubernetes access security, especially when setting up strong authentication, authorization, and network policies, can be challenging.
-
My Favorite DevTools to Build AI/ML Applications!
Deploying AI models into production requires tools that can package applications and manage them at scale. Docker simplifies the deployment of AI applications by containerizing them, ensuring that the application runs smoothly in any environment. Kubernetes, an orchestration system for Docker containers, allows for the automated deployment, scaling, and management of containerized applications, essential for AI applications that need to scale across multiple servers or cloud environments.
-
Building Scalable GraphQL Microservices With Node.js and Docker: A Comprehensive Guide
To learn more, you can start by exploring the official Kubernetes documentation.
-
Building Llama as a Service (LaaS)
With the containerized Node.js/Express API, I could run multiple containers, scaling to handle more traffic. Using a tool called minikube, we can easily spin up a local Kubernetes cluster to horizontally scale Docker containers. It was possible to keep one shared instance of the database, and many APIs were routed with an internal Kubernetes load balancer.
-
The power of the CLI with Golang and Cobra CLI
This package is widely used for powerful CLI builds, it is used for example for Kubernetes CLI and GitHub CLI, in addition to offering some cool features such as automatic completion of shell, automatic recognition of flags (the tags) , and you can use -h or -help for example, among other facilities.
-
Upgrading Hundreds of Kubernetes Clusters
We closely monitor Kubernetes and cloud providers' updates by following official changelogsand using RSS feeds, allowing us to anticipate potential issues and adapt our infrastructure proactively.
-
Kubernetes and back – Why I don't run distributed systems
"You are holding it wrong", huh?
From the homepage https://kubernetes.io/:
"Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications."
Do you see "not recommended for smaller-scale applications" anywhere? Including on the entire home page? Looking for "small", "big" and "large" also yields nothing.
What are some alternatives?
GoLint - [mirror] This is a linter for Go source code. (deprecated)
Apache ZooKeeper - Apache ZooKeeper
staticcheck
bosun - Time Series Alerting Framework
gosimple
Rundeck - Enable Self-Service Operations: Give specific users access to your existing tools, services, and scripts
gcvis - Visualise Go program GC trace data in real time
kine - Run Kubernetes on MySQL, Postgres, sqlite, dqlite, not etcd.
apicompat - apicompat checks recent changes to a Go project for backwards incompatible changes
BOSH - Cloud Foundry BOSH is an open source tool chain for release engineering, deployment and lifecycle management of large scale distributed services.
Go Metalinter
Juju - Orchestration engine that enables the deployment, integration and lifecycle management of applications at any scale, on any infrastructure (Kubernetes or otherwise).