# 关卡1

## Signin

Flag: CNSS{Y0u_kn0w_GET_and_POST}

# 数据库和文件系统

## 对SQL数据库的操作

Go使用database/sql包来进行对SQL数据库的操作。不同于Python中对不同数据库使用不同的依赖包和调用不同的方法，Go官方文档中其实是要求开发者都使用database/sql中的方法来进行统一的数据库操作，而要操作不同的数据库则需要导入不同的数据库驱动即可：

To use database/sql you’ll need the package itself, as well as a driver for the specific database you want to use.

You generally shouldn’t use driver packages directly, although some drivers encourage you to do so.(In our opinion, it’s usually a bad idea.) Instead, your code should only refer to types defined in database/sql, if possible. This helps avoid making your code dependent on the driver, so that you can change the underlying driver (and thus the database you’re accessing) with minimal code changes. It also forces you to use the Go idioms instead of ad-hoc idioms that a particular driver author may have provided.

# 前言

• 学校：西南某末流985
• 专业：软件工程
• 成绩：48/209（去年保研率16%）+2.5加分，保研边缘
• 项目：一个国二