- Download the installer from the page https://golang.org/dl/ and install the package.
Type go
in terminal, to verify the installation.
- Create a Go workspace and set GO PATH
Type go
in terminal, to verify the installation.
This gist contains a test program and sample output that shows a case where a Node Socket can emit an "end" event after an "error" event.
Expected behavior: socket does not emit 'end' event after 'error' event.
Unexpected behavior: socket emits 'end' event after 'error' event.
Works as expected (v0.10):
/* | |
* test-stream.js: demonstrates a case where a Node stream can see an 'error' | |
* event after an 'end' event. This example creates a server socket and then | |
* establishes a connection to it. If the client destroys the socket and the | |
* server keeps writing to it, it's possible for the server to see both an 'end' | |
* event and an 'error' event. | |
*/ | |
var mod_net = require('net'); | |
var mod_os = require('os'); |
/* | |
* Demo: a JavaScript constructor function, even when invoked with "new", can | |
* return a completely different object, even one from a completely different | |
* class. | |
*/ | |
var counter = 0; | |
var lastMyClass; | |
function MyClass() |
The goal of this process is to upgrade a manatee of any vintage to Manatee v2. It relies on ZFS send/recv to replicate the data, but is limited to a migration between nodes in ONWM.
Upgrading moray to a forward/backward compatible version is a prerequisite of the upgrade. The usual process is to disable one moray node, double-check the stack reconnects correctly, reprovision that node, and then repeat for other moray nodes.
If there is only one moray node deployed, deploying a second using the new image allows you to upgrade the original node as above.
/* | |
* testspawn.js: exercises surprising interaction between Node.js "spawn" and | |
* bash. To use this: | |
* | |
* (1) Create a file in the same directory called "foo.rc", with just one line: | |
* | |
* echo "loaded foo.rc" | |
* | |
* (2) Run this program as: | |
* |