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 ( | |
| "net/http" | |
| "time" | |
| "golang.org/x/time/rate" | |
| ) | |
| // ThrottledTransport Rate Limited HTTP Client |
| 0 ✓ steve@hal9000 ~ $ figlist | \ | |
| awk '/fonts/ {f=1;next} /control/ {f=0} f {print}' |\ | |
| while read font; do\ | |
| printf "\n\n\n>>> Font: $font\n\n" | |
| echo 'Hamburgefonstiv' | \ | |
| figlet -w 150 -f $font | |
| done | |
| package main | |
| import ( | |
| "github.com/hajimehoshi/ebiten" | |
| "github.com/peterhellberg/gfx" | |
| ) | |
| const ( | |
| title = "Ebiten GFX Blocks" | |
| scale = 4 |
| #### first class expresssion | |
| variable "ami" {} | |
| resource "aws_instance" "example" { | |
| ami = var.ami | |
| } | |
| #### list & map | |
| resource "aws_instance" "example" { | |
| vpc_security_group_ids = var.security_group_id != "" ? [var.security_group_id] : [] | |
| } |
| // Usage: | |
| // your share intent | |
| Intent intent = new Intent(Intent.ACTION_SEND); | |
| intent.setType("text/plain"); | |
| intent.putExtra(Intent.EXTRA_TEXT, "some text"); | |
| intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "a subject"); | |
| // invoke custom chooser that contains all apps just without Facebook | |
| startActivity(Tools.customChooserIntentNoFb(intent, "Share using", context)); | |
| // Method: |
| package main | |
| import ( | |
| "io" | |
| "net/http" | |
| "os/exec" | |
| ) | |
| var ( | |
| BUF_LEN = 1024 |
| # Makefile template for a shared library in C | |
| # https://www.topbug.net/blog/2019/10/28/makefile-template-for-a-shared-library-in-c-with-explanations/ | |
| CC = gcc # C compiler | |
| CFLAGS = -fPIC -Wall -Wextra -O2 -g # C flags | |
| LDFLAGS = -shared # linking flags | |
| RM = rm -f # rm command | |
| TARGET_LIB = libtarget.so # target lib | |
| SRCS = main.c src1.c src2.c # source files |