Fix "go.mod file not found in current directory or any parent directory"
Fix Go's "go.mod file not found in current directory or any parent directory" error for existing projects, new modules, go get, workspaces, IDEs, and CI.
Golang os Package: Files, Directories, and Environment Examples
Learn the Go os package with practical examples for opening, creating and writing files, working with directories, file metadata, environment variables, and paths.
Fix Go "declared and not used" and "imported and not used"
Fix Go's "declared and not used" and "imported and not used" compiler errors, including blank identifiers, unused return values, imports, and := shadowing.
Golang WebSocket Examples: Server and Client
Learn how to build a WebSocket server and client in Go using Gorilla WebSocket, send text and JSON messages, close connections, and handle common errors.
Golang Read YAML File: Parse YAML into Struct or Map
Learn how to read and parse YAML files in Go, unmarshal YAML into structs or maps, handle nested data and lists, and decode multiple YAML documents.
Golang fsnotify: Watch File and Directory Changes in Go
Learn how to use fsnotify in Go to watch files and directories, handle file events, watch one file reliably, add recursive watches, and debounce changes.
Golang Cobra Tutorial: Subcommands, Flags, and CLI Examples
Golang Cobra tutorial with a complete go cobra example: install spf13/cobra, build subcommands, local and persistent flags, test with go run, set --version, and scaffold apps with cobra-cli.
Checkpoint and Restore Podman Containers with CRIU
Checkpoint and restore Podman containers with CRIU on Podman 5.8.2 — rootful container checkpoint and restore, counter continuation proof, --leave-running, --export and --import migration, --create-image registry …
Clean Up Podman Storage with `system prune` and `system df`
Find and reclaim Podman disk usage on Podman 5.8.2 — podman system df and -v, reclaimable layer caveats, system prune default scope, --all, --volumes, --build, --external, per-object prune commands, Podman 5 vs 6 volume …
Set CPU and Memory Limits for Podman Containers
Set and verify Podman container CPU, memory, swap, PID, cpuset, and block I/O limits on Podman 5.8.2 — --memory, --cpus, --cpu-shares, --pids-limit, cgroup v2 files, pod-level limits, rootless systemd delegation, and …
Monitor Container CPU and Memory with `podman stats`
Monitor Podman container and pod CPU, memory, PIDs, and I/O with podman stats on Podman 5.8.2 — no-stream snapshots, Go templates, podman top host PIDs, pod stats, cgroup v2 verification, and rootless cgroup v1 and …
Generate Kubernetes YAML from Podman Containers with `podman kube generate`
Generate Kubernetes YAML from Podman containers, pods, and volumes with podman kube generate on Podman 5.8.2 — Pod and Deployment output, Service and PVC documents, hostPath and volume mapping, --podman-only, round-trip …
Podman Socket and Docker API Compatibility
Use Podman Docker API compatibility — enable podman.socket rootless and rootful, curl _ping and libpod endpoints, set DOCKER_HOST, run docker compose against the socket, install podman-docker on RHEL, understand socket …
Verify Container Image Signatures with Podman
Configure Podman image trust with policy.json and podman image trust — accept, reject, signedBy, and sigstoreSigned scopes, GPG signing with podman image sign, registries.d sigstore paths, pull-time verification on …
Manage Container Secrets with Podman
Create and mount Podman secrets from stdin, files, and environment variables — file, pass, and shell drivers, mount vs env delivery with uid/gid/mode, tested --replace behavior on Podman 5.8.2, build --secret cache …
Podman `containers.conf` Explained: Defaults, Overrides and Modules
Configure Podman defaults with containers.conf — layered paths, drop-in precedence, containers network and engine tables, CONTAINERS_CONF and CONTAINERS_CONF_OVERRIDE, opt-in modules, string-array append syntax, and …
Podman `registries.conf` Explained: Search, Aliases and Mirrors
Configure Podman image resolution with registries.conf — unqualified-search-registries, short-name aliases, short-name-mode, machine-generated alias cache, insecure and blocked registries, prefix matching, location …
Podman Login: Authenticate to Container Registries
Log in to container registries with podman login — auth.json locations for rootless and rootful, --password-stdin, --authfile, REGISTRY_AUTH_FILE, credential helpers, secrets, logout, and a CI pattern on Podman 5.8.2.
Automatically Update Podman Containers with Quadlet
Configure Podman auto-update on Quadlet-managed containers — AutoUpdate registry vs local, podman-auto-update.timer, dry-run checks, proving container recreation, rollback limits with sdnotify and Notify=healthy, and …
Podman Quadlet CLI: `install`, `list`, `print` and `rm`
Manage Podman Quadlet declarations with podman quadlet install, list, print, and rm — single files, asset bundles, application directories, .quadlets multi-unit sources, list filters, --replace updates, and …
Run Podman Containers as systemd Services with Quadlet
Run Podman containers as systemd services with Quadlet — the generator model, search paths, your first .container file, service vs container naming, why systemctl enable fails, [Install] boot wiring, daemon-reload, logs, …
`podman unshare`: Inspect UID Maps and Fix Rootless File Ownership
Use podman unshare to enter the rootless user namespace — inspect uid_map, read file ownership as Podman sees it, fix mapped paths with unshare chown, mount container rootfs, and debug bridge networking with …
Rootless vs Rootful Podman: Differences and Limitations
Compare rootless and rootful Podman — user namespace mapping, separate image stores, pasta vs bridge networking, privileged-port limits, device node creation, CRIU checkpoint, NFS storage nuance, and when to pick each …
Rootless Podman: Run Containers Without Root
How to run Podman as a normal Linux user with subuid and subgid, verify uid_map mappings, fix not-enough-IDs and XDG_RUNTIME_DIR errors, use podman system migrate after range changes, and avoid destructive resets.
Rootless Podman Networking with pasta
How rootless Podman networking works with pasta as the Podman 5 default — host address copying, outbound Internet access, host.containers.internal, pasta options, rootless Netavark bridges, rootlessport source-IP …
Podman DNS and Container Name Resolution with Aardvark DNS
How Podman resolves container names with Aardvark DNS — DNSEnabled on default vs user networks, getent and aliases, resolv.conf and --dns forwarding, internal network behavior, and a diagnostic sequence for name vs …
Podman Port Mapping: Publish Container Ports with `-p`
Publish container ports with Podman -p and -P — host-to-container mapping, loopback and host-IP binding, random ports, TCP and UDP, port ranges, podman port, pod-level publishing, network-mode limits, and rootless pasta …
Pull Container Images with `podman pull`
Pull container images with podman pull — fully qualified names, tags and digests, podman search, pull policies, multi-architecture pulls with --arch and --platform, registry examples, retries, and routing common pull …
Troubleshoot High Memory Usage in Linux
Troubleshoot Linux high memory usage by reading free and MemAvailable, ranking processes with ps and pidstat, checking swap and memory pressure, inspecting kernel slab usage, and deciding when low free RAM is normal …
Troubleshoot High I/O Wait in Linux
Troubleshoot Linux high iowait with mpstat and top, find the busy disk with iostat, name I/O-heavy processes with pidstat, check D state and swap activity, and match symptoms to the real storage bottleneck.

