开发规范
swingLau007
这个作者很懒,什么都没留下…
展开
-
golang 对象继承与指针使用
需求背景:读取people 表数据,再转成Engineer对象,并添加Engineer属性一、对象与继承的声明1.1 定义一个简单的对象 People, 包括性别、年龄、身高type People struct { Gender string Age int Height int}peopleList := make([]*People, 0)total, err := cdb.DB().Table(condition).Limit(limit, offset).Desc("原创 2021-03-30 20:46:10 · 255 阅读 · 0 评论 -
批量修改目录下文件内容信息 (sed)
批量修改文件内容#! /bin/bashfunction read_dir(){for file in `ls $1` do if [ -d $1"/"$file ] ;then read_dir $1"/"$file elif [ "mysqlconfig.json" == ${file} ] ; then pathInfo=(${1//\// }) if [ "conf_dev" == ${pathInfo[-1]} ] ;then echo $1"/"原创 2021-01-08 14:27:11 · 546 阅读 · 0 评论