bangsv / my_lib_go

Documentation of an exported function should start with the function’s name GO-D5001
Documentation
Minor
a year agoa year old
comment on exported function ServeFile should be of the form "ServeFile ..."
 9	"github.com/gorilla/mux"
10)
11
12// func ServeFile() handles requests to serve a particular file. 13// It takes a ResponseWriter (w) and a Request (r) as arguments. 
14func ServeFile(w http.ResponseWriter, r *http.Request) {
15    // extract the "id" parameter from the URL
comment on exported function Bubble_sort should be of the form "Bubble_sort ..."
 1package Alg_for_array
 2
 3// All sorted 4func Bubble_sort(array []int) { // bubble sort
 5	for i := 0; i < len(array); i++ {
 6		for j := 0; j < len(array)-1; j++ {
comment on exported function Sum should be of the form "Sum ..."
 5	"time"
 6)
 7
 8// The Sum function takes an array of integers and returns the sum of all the numbers in the array. 9// The array is defined in the main function and passed to the Sum function.
10func Sum(array []int) int {
11	sum := 0