Beego Learning Notes 10: Easyui Use

EasyUI use 1> Download EasyUI. Download address: http://www.jeasyui.com/download/index.php     Download according to whether you use jQuery or Angular. I use jQuery version. 2> Unzip the easyui folder and add it to the project.     3> Write implementation logic 1 - > add a new easyui.go To edit business logic 2 - > Add routing co ...

Posted on Thu, 02 Jul 2020 12:03:54 -0400 by eelmitchell

Golang net/rpc package learning

golang provides an out of the box RPC service, which is simple but not simple. RPC introduction Remote Procedure Call (RPC) is a kind of computer communication protocol. It allows programs running on another computer to call subroutines in another address space (generally a computer in an open network), while programmers are just like calling l ...

Posted on Sat, 27 Jun 2020 23:01:36 -0400 by lasith

Implementation of golang fuse

A fuse is like a fuse. When there is a problem with the services we depend on, we can be fault tolerant in time. On the one hand, it can reduce the dependence of dependent services on their own access and prevent avalanche effect; on the other hand, it can reduce the request frequency to facilitate the upstream recovery of services as soon as p ...

Posted on Sat, 27 Jun 2020 22:58:56 -0400 by jdaura

Go three Map and String

Yiduo doesn't press on. Learn the recently popular Go language and make notes. Relevant codes and notes are also put on Git, Portal. MAP Map declaration m := map[string]int{"one":1, "two":2, "three":3} m1 := map[string]int{} m1["one"] = 1 m2 := make(map[string]int, 10/*Initial Capacity*/) //Why not initialize len? For slices: = make ([] int, ...

Posted on Fri, 26 Jun 2020 23:45:40 -0400 by skippa

Goang Implements Load Balancing Algorithm

1. Real Server package main import ( "fmt" "log" "net/http" "os" "os/signal" "strconv" "syscall" "time" ) type realServer struct { Addr string } func (rs *realServer) HelloHandler(w http.ResponseWriter,r *http.Request){ data := fmt.Sprintf("[%s] http://%s%s \n\n",rs.Addr,rs.Addr,r.RequestURI) w.Wr ...

Posted on Fri, 26 Jun 2020 13:12:54 -0400 by Richzilla

Beego Learning Notes 13:Api Writing

Api Writing 1> The common data formats used by api are json and xml. 2> Here's how different data formats are used 1->JSON data direct output. After calling ServeJSON, the content-type is set to application/json, and the data is serialized as JSON output 2->Direct output of XML data After calling ServeXML, the content-type is set to ...

Posted on Fri, 26 Jun 2020 12:14:22 -0400 by Qlubbie

generate of Go tools

Go language provides a series of powerful tools, flexible use of which can make our project development easier. The tool set includes the following. bug start a bug report build compile packages and dependencies clean remove object files and cached files doc show documentatio ...

Posted on Thu, 25 Jun 2020 22:36:07 -0400 by sdjensen

Beego Learning Notes 14:Session Control

Session Control 1> Session s are often used as global variables, such as logging the currently logged-in user or passing data between pages. 2> The session module is built in the Beego framework. Currently, the session module supports back-end engines including memory, cookie s, file s, mysql, redis, couchbase, memcache, postgres. Users c ...

Posted on Thu, 25 Jun 2020 12:20:31 -0400 by JetJagger

High order play method of default value setting of Golang skill

Recently, GRPC has been used to find a very good design, which is worth learning. In our daily method writing, we want to set a default value for a field, and do not pass this parameter in the scenario without customization. However, Golang does not provide the ability to set the default value of method parameters in dynamic languages such as P ...

Posted on Tue, 23 Jun 2020 23:30:39 -0400 by curtisdw

negroni of Go daily

brief introduction negroni Is a library that focuses on HTTP middleware. It is small, non intrusive, and encourages the use of standard library net/http handlers. This article introduces this library. Why middleware? There are some logic codes, such as statistics, log, debugging, etc., which are needed in every processor. If you add them one by ...

Posted on Sun, 21 Jun 2020 21:26:24 -0400 by dimxasnewfrozen