Skip to content

Instantly share code, notes, and snippets.

Avatar
🚩
I may be slow to respond.

Matt Layher mdlayher

🚩
I may be slow to respond.
View GitHub Profile
@mdlayher
mdlayher / go.json
Created Jan 10, 2021
Matt's VSCode Go snippets
View go.json
{
"t.Fatalf on error": {
"prefix": "errtfatalf",
"body": [
"if err != nil {\n\tt.Fatalf(\"failed to $1: %v\", err)\n}\n\n$0"
],
"description": "Add an error check that invokes t.Fatalf on error."
},
"log.Fatalf on error": {
"prefix": "errlogfatalf",
View gist:7e4cc832f5cc0f2ec7e6934bd74a8c0f
$ nixpkgs-review pr 92052
$ git -c fetch.prune=false fetch --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/92052/head:refs/nixpkgs-review/1
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 7 (delta 4), reused 7 (delta 4), pack-reused 0
Unpacking objects: 100% (7/7), 3.50 KiB | 894.00 KiB/s, done.
View info.md

Given an input JSON file derived from channels.nix:

{
    "channels": {
        "nixos-unstable": {
            "job": "nixos/trunk-combined/tested",
            "current": true
        },
        "nixos-unstable-small": {