How to fix vim: ModuleNotFoundError: No module named '_ctypes' in Ubuntu

  1. 重装libffi-dev
    1
    sudo apt-get install libssl-dev openssl

or

How to fix ModuleNotFoundError: No module named '_ctypes' in Ubuntu

  1. 重装libffi-dev
    1
    sudo apt-get install libssl-dev openssl

or

What happens passing a structure to function in Go

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package main

import (
"fmt"
"sync"
)

type Account struct {
Money float64
}

type User struct {
Name string
account *Account
mutex *sync.Mutex
}

func print1(u *User) {

fmt.Printf("%p\n", u.account)
fmt.Printf("%p\n", u.mutex)
fmt.Printf("%p\n", u)
}

func print2(u User) {

fmt.Printf("%p\n", &u.account)
fmt.Printf("%p\n", &u.mutex)
fmt.Printf("%p\n", &u)
}

func main() {

u := User{
account: &Account{Money: 12.2},
mutex: &sync.Mutex{},
}

fmt.Printf("%p\n", &u.account)
fmt.Printf("%p\n", &u.mutex)
fmt.Printf("%p\n", &u)

println("====")
print1(&u)

println("====")
print2(u)
}

Filter Sensitive Info In Go

My computer develop environment

1
2
3
4
5
% cat /etc/issue
Ubuntu 16.04.7 LTS \n \l

% go version
go version go1.14.6 linux/amd64

Varnish For Wordpress

My computer develop environment

1
2
$ cat /etc/system-release
CentOS Linux release 7.7.1908 (Core)
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×