title: Introduction to Go sub_title: A Masterclass author: MachShip theme: name: catppuccin-mocha override: intro_slide: title: font_size: 4
Right off the bat, I recommend reading the official Go blog article that introduces generics, it's authoritative and to the point, which this article is neither. Instead, I want to add some colour to Go generics with a little of my personal experience.
Let's begin by talking about mocking: I have no argument that disciplined use of mocking objects is best practice, but more often than not, I am frustrated with the existing options for mocking Go interfaces. The Go ecosystem offers a surprising variety of options for generating, building, and integrating mocks into your favourite test rig. Personally, I find that they have numerous and complicated options, and cumbersome APIs. Usually they have at least one limitation, for example they don't work well with a composite of small interfaces, or dealing with high ordered functions is mind-meltingly difficult. I yearn for a mock that will simply and enthusiastically accept a function that can be tailored t
| go.sum -diff -merge |
There are seemingly a few incompatibilities with Vue and Istanbul/nyc at the moment, making it a bit difficult to set up proper coverage reporting for Vue files. Thankfully, there's a relatively easy way to fix that!
This will walk you through everything you need to do to add tests and coverage reporting to your vue-cli based project.
-
Install dependencies for testing and coverage reporting
yarn add -D @vue/cli-plugin-unit-mocha @vue/test-utils istanbul-instrumenter-loader nyc
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <title>SANKEY Experiment</title> | |
| <style> | |
| .node rect { | |
| cursor: move; | |
| fill-opacity: .9; | |
| shape-rendering: crispEdges; | |
| } |
| # If applied, this commit will... | |
| # Why is this change needed? | |
| Prior to this change, | |
| # How does it address the issue? | |
| This change | |
| # Provide links to any relevant tickets, articles or other resources |
| .spacemacs.env |
| #!/usr/bin/env bash | |
| # TODO: Look at nixpkgs/pkgs/build-support/setup-hooks/auto-patchelf.sh | |
| # https://ms-vsliveshare.gallery.vsassets.io/_apis/public/gallery/publisher/MS-vsliveshare/extension/vsliveshare/0.3.423/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage | |
| # Dangerous: | |
| # curl -q https://gist.githubusercontent.com/b333z/5fb902161685c5141bbc91b39a152831/raw/f65d2d0feb475b693c779eeb74fd52ca46b32916/vsls | bash | |
| set -eu |
| out | |
| node_modules | |
| package.json | |
| main.js | |
| *.jar | |
| .git | |
| .gitignore | |
| Dockerfile | |
| README.md | |
| .dockerignore |