All of the following information is based on go version go1.17.1 darwin/amd64
.
GOOS | Out of the Box |
---|---|
aix |
✅ |
android |
✅ |
package main | |
import ( | |
"context" | |
"encoding/base64" | |
"flag" | |
"fmt" | |
"log" | |
container "google.golang.org/api/container/v1beta1" |
"""Provide high-level UDP endpoints for asyncio. | |
Example: | |
async def main(): | |
# Create a local UDP enpoint | |
local = await open_local_endpoint('localhost', 8888) | |
# Create a remote UDP enpoint, pointing to the first one |
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
package main | |
import ( | |
"fmt" | |
"gopkg.in/mgo.v2" | |
"gopkg.in/mgo.v2/bson" | |
) | |
func main() { | |
session, err := mgo.Dial("localhost") | |
if err != nil { |
/* | |
Usage: go run main.go < /path/to/private-key.xml | |
Optionally takes base64 encoded input. | |
This is a very crude implementation. Any errors result in a panic. | |
*/ | |
package main | |
import ( |
/* | |
C socket server example, handles multiple clients using threads | |
Compile | |
gcc server.c -lpthread -o server | |
*/ | |
#include<stdio.h> | |
#include<string.h> //strlen | |
#include<stdlib.h> //strlen | |
#include<sys/socket.h> |
package com.pascalwelsch.utils; | |
import android.support.annotation.Nullable; | |
import android.support.v7.util.DiffUtil; | |
import android.support.v7.widget.RecyclerView; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.List; |
Using MongoDB in golang with mgo |
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example" | |
android:versionCode="1" | |
android:versionName="1.0"> | |
<uses-sdk android:minSdkVersion="8"/> | |
<uses-permission android:name="android.permission.READ_CONTACTS" /> | |
<application android:label="@string/app_name"> |