Skip to content

Commit 2886556

Browse files
committed
💡 Add Comments to exported functions
1 parent 4edc118 commit 2886556

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/root.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Exports Quotable Struct and FetchQuotabler Method
1+
// Package quotable exports Quotable Struct and FetchQuotabler Method
22
package quotable
33

44
import "encoding/json"
@@ -15,6 +15,7 @@ type Quotable struct {
1515
DateModified string `json:"dateModified"`
1616
}
1717

18+
// Fetches the Quotable API.
1819
func GetQuotableObject() Quotable {
1920
var data string = parseHttpResponse(fetch("https://api.quotable.io/random"))
2021

@@ -24,6 +25,7 @@ func GetQuotableObject() Quotable {
2425
return parsedData
2526
}
2627

28+
// Return a random quote and author.
2729
func GetRandomQuoteAndAuthor() (string, string) {
2830
quotableFetch := GetQuotableObject()
2931
return quotableFetch.Content, quotableFetch.Author

0 commit comments

Comments
 (0)