Make comments more useful

This commit is contained in:
2025-01-24 23:06:32 +01:00
parent be79a13d48
commit 9ab48787d4
23 changed files with 115 additions and 93 deletions

View File

@@ -14,7 +14,10 @@ type Content interface {
Check() error
}
// NewContent creates a new Content. It returns a Content and an error.
// NewContent creates a new Content. It takes in an int contentType, a string
// mediaType and an any content and returns a Content.
//
// If contentType is invalid, it returns nil.
func NewContent(contentType int, mediaType string, content any) Content {
switch contentType {
case 0: