Reflection in Golang

brief introduction Reflection is the process of dynamically calling methods and properties of objects Reference package: import ( "reflect" ) Common methods: reflect.TypeOf() and reflect.ValueOf() reflect.ValueOf() is used to get the value of the data in the input parameter interface. If the interface is empty, it returns ...

Added by deko on Sun, 10 Nov 2019 21:34:11 +0200

Add Documents Using Go

brief introduction swagger start Write documentation Function summary Code for current section brief introduction Documentation is essential for API services. Documents, however, are annoying, especially synchronous updates. If you choose handwritten documents, you often forget to update them.Or in the early stages of high-speed development, ...

Added by ztkirby on Sun, 10 Nov 2019 03:16:06 +0200

WireMock - Powerful Analog Test Tool

brief introduction It is officially stated that WireMock is an HTTP-based API emulator that simulates your API for fast, powerful, and comprehensive testing. Its core is the Web server, which can launch to provide a canned response (stub) to a specific request and capture incoming requests for later inspection (validation), and all WireM ...

Added by markmuir on Sat, 09 Nov 2019 20:50:17 +0200

Using jsonp to grab cross domain data in Vue project

Download jsonp NPM install jsonp Add a jsonp.js in the JS folder to encapsulate a jsonp() How to encapsulate a jsonp() In the downloaded jsopn, JSON (url, options, callback) is a parameter in the native JSON method; Introducing download jsonp import originJsonp from 'jsonp'; Export your own defined JSON functions //This JSON function i ...

Added by hypertech on Sat, 09 Nov 2019 16:22:37 +0200

Summary on the use of datagrid in easyui

Recently, I took over a project with a relatively long implementation cycle. The foreground technology is easyUI. Now I need to modify a component, which is simply a selector. Due to the problem of code confidentiality, the figure of this page is not shown. The page selector is a text followed by a query icon, which is originally ...

Added by feddie1984 on Fri, 08 Nov 2019 23:27:28 +0200

Front End Training - Intermediate Stage (25) - Web Socket Network Programming (Issues 2019-11-14)

The most basic front end is HTML+CSS+Javascript.Having mastered these three technologies, even if you are getting started, is just getting started. Now the definition of front-end development is much more than that.Front-end small classes (HTML/CSS/JS), with the central idea of upgrading technical level and basic knowledge, we have classes (eve ...

Added by xdracox on Fri, 08 Nov 2019 02:08:10 +0200

Go micro + PHP + consumer

First we build a service with go micro. (for the use of go micro, please refer to the official instance or document) //Create a new microservice micro new --type "srv" user-srv   Define our service. Here we define two rpc services, Register and User 1 // modify proto 2 syntax = "proto3"; 3 ​ 4 package go.micro.srv.user; 5 ​ 6 servi ...

Added by 1337hovie on Thu, 07 Nov 2019 08:41:22 +0200

express builds a pure background, and the foreground uses Vue cli scaffold

Note: after the background service changes, you need to restart the service; after the front-end configuration file changes, you need to run the command npm run dev againI. use express to provide background service and output interfaceBackground directory structure: main.js var express = require('express'); var app = express(); app.get('/', fu ...

Added by jackiw on Thu, 07 Nov 2019 04:15:43 +0200

Spring Boot 2.X: integrated Swagger2 development API documentation (Online + offline)

Preface I believe that many back-end development projects will encounter the need to write api documents, whether it is to provide better docking for the front-end, mobile end, etc., or in the future for the convenience of handover, it will be required to write api documents. There are many pain points in handwritten api documents: When the do ...

Added by hmvrulz on Wed, 06 Nov 2019 04:54:00 +0200

When using Baidu's face recognition, there are several points to pay attention to (mainly some errors)

The premise is to call Baidu face recognition interface under the vue framework vue project, unable to get this in the reader.onload function, unable to transfer the value to the global Solution: if you encounter this problem, use let that = this to record this in the outer layer of reader.onload function, so that you can get this by using that ...

Added by scraff on Mon, 04 Nov 2019 17:32:27 +0200