- 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
<html> | |
<head> | |
<title>WebSocket demo</title> | |
</head> | |
<body> | |
<div> | |
<form> | |
<label for="numberfield">Number</label> | |
<input type="text" id="numberfield" placeholder="12"/><br /> |
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
func dump_interface_array(args interface{}) { | |
val := reflect.ValueOf(args) | |
fmt.Println(val.Kind()) |
// http://www.2ality.com/2013/09/javascript-unicode.html | |
function toUTF16(codePoint) { | |
var TEN_BITS = parseInt('1111111111', 2); | |
function u(codeUnit) { | |
return '\\u'+codeUnit.toString(16).toUpperCase(); | |
} | |
if (codePoint <= 0xFFFF) { | |
return u(codePoint); | |
} |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Analytics; | |
public class MyGameNameHereAnalytics : MonoBehaviour | |
{ | |
private void Start() | |
{ | |
DontDestroyOnLoad(this.gameObject); |
Type go
in terminal, to verify the installation.
// this is a file that puts together all redigo examples for convenience | |
// (see https://godoc.org/github.com/gomodule/redigo/redis#pkg-examples) | |
// | |
// start by ensuring that redis is running on port 6379 (`redis-server`) | |
// uncomment the main method as needed, and run the script (`go run main.go`) | |
package main | |
import ( | |
"fmt" | |
"github.com/gomodule/redigo/redis" |