Skip to content

Instantly share code, notes, and snippets.

View austin-millan's full-sized avatar

Austin Millan austin-millan

View GitHub Profile
@austin-millan
austin-millan / setup_ubuntu.sh
Created September 27, 2023 03:25
setup_ubuntu.sh
#! /usr/bin/env bash
set -ex
sudo apt-get update
sudo apt-get install -y curl
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
{"valA":0,"valB":1}
package main
import (
"encoding/json"
"fmt"
)
type A struct {
ValA int `json:"valA"`
ValB int`json:"valB"`
{"valA":99,"valB":1}
==================
WARNING: DATA RACE
Write at 0x00000066b9d0 by goroutine 8:
reflect.Value.SetInt()
/usr/local/go/src/reflect/value.go:1642 +0xfd
encoding/json.(*decodeState).literalStore()
/usr/local/go/src/encoding/json/decode.go:1002 +0x266e
encoding/json.(*decodeState).value()
/usr/local/go/src/encoding/json/decode.go:384 +0x307
package main
import (
"fmt"
)
type A struct {
ValA int `json:"valA"`
ValB int `json:"valB"`
}
package main
import (
"encoding/json"
"fmt"
)
type A struct {
ValA int `json:"valA"`
ValB int`json:"valB"`
0xc00018e000
0xc00018e000
[{1 0} {2 0}]
package main
import (
"database/sql"
"encoding/json"
"fmt"
"strings"
"github.com/jmoiron/sqlx"
)
[{},{"valA":1,"valB":3}]
{"valA":0,"valB":1}