go

    -2Hitze

    1Antwort

    Mit Ich möchte eine Karte durch einen Kanal in gehen passieren: func main() { var pipe map[string]string pipe = make(chan map[string]string, 2) go connect("myhost", "100", pipe) ou

    -2Hitze

    1Antwort

    Ich versuche, einfache Chat-Anwendung zu entwickeln. Und User Talks kommen vom Webservice wie dieser json. Und ich entarre diese json als map [string] Schnittstelle {}. Meine Frage ist, ich versuche a

    0Hitze

    1Antwort

    Ich habe zwei private Repositories auf Github, A und B. Beide sind Golang-Projekte. Projekt A hängt vom Repository B ab. Ich habe beide Repositorys mit dem Google-Quellcode verknüpft und den Berechtig

    0Hitze

    1Antwort

    if v, ok := os.LookupEnv("IDAASHTTPPORT"); ok { c.HTTPPort, _ = strconv.Atoi(v) } if v, ok := os.LookupEnv("IDAASDBNAME"); ok { c.DBUserName = v } if v, ok := os.LookupEnv("IDAASDBPW");

    1Hitze

    1Antwort

    ich mit golang Kanäle neu bin und konnte nicht unterschätzen, warum Veränderungen das Verhalten des Programms tut, wenn ich Kanalpuffergröße package main import ( "fmt" ) func channels(in <-c

    1Hitze

    2Antwort

    package main import "fmt" type Circle struct { x string } func main() { circle := Circle{x: "blah"} results := make([]*Circle, 1) results = append(results, &circle) fmt

    -1Hitze

    1Antwort

    Ich schreibe eine Webanwendung mit Go als Backend. Ich verwende diese GraphQLibliothek (link) und das Echo-Webframework (link). Das Problem besteht darin, dass die graphql-go-Bibliothek das context-Pa

    1Hitze

    2Antwort

    Ich habe folgenden Strukturtyp: type ExportJob struct { AssetID string `json:"asset_id"` ObjectType string `json:"object_type"` Usage string `json:"usage"` Reference string `json:

    0Hitze

    1Antwort

    Ich folgen guide by Alan Donovan und versuchen, GIF zu machen. Aber in der Ausgabe habe ich die ganze Zeit ein unlesbares gif-Bild bekommen. Ich erinnere mich, als ich unter Windows 8.0 war, kann ich

    1Hitze

    1Antwort

    In Go Einfügen können Sie ein Stück in die Mitte eines anderen Scheibe like this einfügen: a = append(a[:i], append(b, a[i:]...)...) Aber, wie ich es verstehe, dass erste a[i:]-b, indem es das anhän