Wrote for a joyful journey of Go.
package main
import (
"fmt"
)
func i64tob(val uint64) []byte {
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"strings" | |
"github.com/dgrijalva/jwt-go" | |
) | |
func middleware(next http.Handler) http.Handler { |
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"io" | |
"log" | |
"sync/atomic" | |
"time" |
adb shell setprop log.tag.FA VERBOSE | |
adb shell setprop log.tag.FA-SVC VERBOSE | |
adb logcat -v time -s FA FA-SVC |
Wrote for a joyful journey of Go.
package main
import (
"fmt"
)
func i64tob(val uint64) []byte {
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
...> | |
<androidx.recyclerview.widget.RecyclerView | |
... | |
android:splitMotionEvents="false" /> | |
</LinearLayout> |
package main | |
import ( | |
"bytes" | |
"encoding/gob" | |
"fmt" | |
"log" | |
) | |
func main() { |
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/golang/snappy" | |
) | |
func main() { |
cd $HOME | |
FileName='go1.13.4.linux-armv6l.tar.gz' | |
wget https://dl.google.com/go/$FileName | |
sudo tar -C /usr/local -xvf $FileName | |
cat >> ~/.bashrc << 'EOF' | |
export GOPATH=$HOME/go | |
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin | |
EOF | |
source ~/.bashrc |
package main | |
import ( | |
"fmt" | |
"log" | |
"math/rand" | |
"net/http" | |
"time" | |
"github.com/prometheus/client_golang/prometheus" |
package main | |
import ( | |
"strings" | |
"path/filepath" | |
) | |
func fileNameWithoutExtension(fileName string) string { | |
return strings.TrimSuffix(fileName, filepath.Ext(fileName)) | |
} |