1. Golang
文件头
// Package main
// desc: this is the main file
// author: Your Name
// date: 2024/1/11
// version: 1.0.0
2. C/C++
文件头
//////////////////////////////////////////////////
//
// this is description
//
// author: Your Name
// date: 2024/1/11
// version: 1.0.0
//
//////////////////////////////////////////////////
/****************************************
*
* this is description
*
* author: Locker
* date: 2024/1/11
* version: 1.0.0
*
****************************************/
函数注释
/**************************************************
* function name
* Desc: this is function description.
* Returns: return something.
* Parameters:
* name: this is a param-desc
* age: this is a param-desc
**************************************************/
int findOne(char name, int age) {
return 1;
}
3. Java
类注释
/**
* this is description
*
* @author Your Name
* @date 2024/1/11
* @version 1.0.0
* @see cn.hutool.core.map.MapUtil
* @see com.google.common.collect.Maps
*/
方法注释
/**
* function description
* <p>
* something else
* <p>
* {@link AbcClass#methodB()}
*
* @param name .
* @param age .
* @return sth.
* @see com.project.common.Result
*/
Result findOne(String name, int age);
4. C#
模块与类
///<summary>
///
/// this is description
///
/// author: Your Name
/// data: 2024/1/11
/// version: 1.0.0
///
///</summary>
5. PHP
文件头
// +-------------------------------------------------------------------+
// | This is a PHP file. |
// | ============================= |
// | |
// | PHP is the beast. |
// +-------------------------------------------------------------------+
// | PHP version 5 required. |
// +-------------------------------------------------------------------+
// | Homepage: http://www.your.org/ |
// +-------------------------------------------------------------------+
// | This program is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU General Public License as |
// | published by the Free Software Foundation; either version 2 of |
// | the License, or (at your option) any later version. |
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with this program; if not, contact: |
// | |
// | author: Your Name |
// | date: 2024/1/11 |
// | version: 1.0.0 |
// | |
// +-------------------------------------------------------------------+
6. Shell
文件头
# =========================================================================== #
# FILE: start.sh #
# USAGE: sudo ./start.sh #
# #
# DESCRIPTION: This script helps to pass through the captive portals in #
# public Wi-Fi networks. #
# #
# REQUIREMENTS: coreutils, sipcalc, nmap #
# AUTHOR: Your Name #
# COMPANY: Hire me! I am a cool dude! #
# VERSION: 1.0.0 #
# CREATED: 2024.1.11 - 11:11 #
# COPYRIGHT: 2016 Stanislav "systematicat" Kotivetc #
# LICENSE: WTFPL v2 #
# =========================================================================== #
637

被折叠的 条评论
为什么被折叠?



