当前位置:网站首页>Talking about the struct of go
Talking about the struct of go
2022-06-30 06:01:00 【Flower master】
Always thought that struct It is used to store data , Until today, when writing code ,goland Give me a hint

f That's what we usually say field
m Namely method.
Think about the classes we usually write , Isn't it just a class ? It's just god The encapsulation of is based on the case of the initial letter . also init() It can also be seen as __construct() Initialize things ( This description is not very accurate , stay go It's all about &struct{} To initialize .)
<?php
class A {
protected $a;
public function aaa(){
}
}
?>
边栏推荐
- SHELL
- Codeforces C. Andrew and Stones
- Zibll子比主题V6.4.1wordpress 开心版源码下载_破解原版/直接使用/无需教程
- InputStream to inputstreamsource
- Use of tornado template
- [secretly kill little partner pytorch20 days] - [day4] - [example of time series data modeling process]
- 雲服務器部署 Web 項目
- Idea of capturing mobile terminal variant combination
- MySQL数据库用户管理
- OSPF - authentication and load balancing summary (including configuration commands)
猜你喜欢
![[secretly kill little partner pytorch20 days] - [day4] - [example of time series data modeling process]](/img/f3/e51cb80f838faba8dfd90596d6e57b.jpg)
[secretly kill little partner pytorch20 days] - [day4] - [example of time series data modeling process]

MySQL advanced (Advanced SQL statement)

About modifying dual system default startup item settings

What kind of answer has Inspur given in the big AI model landing test?

MySQL storage system

inno setup 最简单的自定义界面效果

Mysql database user management

At the beginning of 2022, people who are ready to change jobs should pay attention to

Projet Web de déploiement du serveur Cloud

Codeforces B. MEX and Array
随机推荐
网络基础知识
Xi'an Jiaotong 21st autumn "computerized accounting" online homework answer sheet (I) [standard answer]
超简单 STM32 RTC闹钟 时钟配置
Promise knowledge points
【学习强化学习】总目录
Codeforces B. MEX and Array
STM32F103系列控制的OLED IIC 4针
ES6扩展运算符(...)
What do you think of the deleted chat records? How to restore the deleted chat records on wechat?
Solidity - Security - reentrancy attack
English grammar_ Adjective / adverb Level 3 - superlative
Prototype and prototype chain in JS
Ultra simple STM32 RTC alarm clock configuration
二十四、输入输出设备模型(串口/键盘/磁盘/打印机/总线/中断控制器/DMA和GPU)
Use of tornado template
Codeforces Round #390 (Div. 2) D. Fedor and coupons
Es6数组
Implementation of property management system with ssm+ wechat applet
【数据库】事务
Who doesn't want a blog site of their own - build a blog site WordPress