From 30a7c9ea37a0f36451946f8688a3f807618a7eff Mon Sep 17 00:00:00 2001 From: Cameron Moore Date: Thu, 29 Nov 2018 21:32:53 -0600 Subject: [PATCH] tpl: Add godoc packages comments Also fix package name in tpl/templates. --- tpl/cast/cast.go | 1 + tpl/collections/collections.go | 2 ++ tpl/compare/compare.go | 1 + tpl/crypto/crypto.go | 1 + tpl/data/data.go | 2 ++ tpl/encoding/encoding.go | 1 + tpl/fmt/fmt.go | 1 + tpl/images/images.go | 1 + tpl/inflect/inflect.go | 1 + tpl/lang/lang.go | 1 + tpl/math/math.go | 1 + tpl/os/os.go | 2 ++ tpl/partials/partials.go | 2 ++ tpl/path/path.go | 1 + tpl/resources/resources.go | 1 + tpl/safe/safe.go | 2 ++ tpl/strings/strings.go | 1 + tpl/templates/init.go | 2 +- tpl/templates/init_test.go | 2 +- tpl/templates/templates.go | 3 ++- tpl/time/time.go | 1 + tpl/transform/transform.go | 1 + tpl/urls/urls.go | 1 + 23 files changed, 29 insertions(+), 3 deletions(-) diff --git a/tpl/cast/cast.go b/tpl/cast/cast.go index 999b3121..c864b5e3 100644 --- a/tpl/cast/cast.go +++ b/tpl/cast/cast.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package cast provides template functions for data type conversions. package cast import ( diff --git a/tpl/collections/collections.go b/tpl/collections/collections.go index d9baddf6..bad65369 100644 --- a/tpl/collections/collections.go +++ b/tpl/collections/collections.go @@ -11,6 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package collections provides template functions for manipulating collections +// such as arrays, maps, and slices. package collections import ( diff --git a/tpl/compare/compare.go b/tpl/compare/compare.go index b228040c..08fb492d 100644 --- a/tpl/compare/compare.go +++ b/tpl/compare/compare.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package compare provides template functions for comparing values. package compare import ( diff --git a/tpl/crypto/crypto.go b/tpl/crypto/crypto.go index 7aaa9291..5771c98b 100644 --- a/tpl/crypto/crypto.go +++ b/tpl/crypto/crypto.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package crypto provides template functions for cryptographic operations. package crypto import ( diff --git a/tpl/data/data.go b/tpl/data/data.go index 61de2f72..33eee7b2 100644 --- a/tpl/data/data.go +++ b/tpl/data/data.go @@ -11,6 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package data provides template functions for working with external data +// sources. package data import ( diff --git a/tpl/encoding/encoding.go b/tpl/encoding/encoding.go index 4b02c426..9045acd1 100644 --- a/tpl/encoding/encoding.go +++ b/tpl/encoding/encoding.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package encoding provides template functions for encoding content. package encoding import ( diff --git a/tpl/fmt/fmt.go b/tpl/fmt/fmt.go index 09e4f5a4..8b24648c 100644 --- a/tpl/fmt/fmt.go +++ b/tpl/fmt/fmt.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package fmt provides template functions for formatting strings. package fmt import ( diff --git a/tpl/images/images.go b/tpl/images/images.go index f5d32f44..4cb809df 100644 --- a/tpl/images/images.go +++ b/tpl/images/images.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package images provides template functions for manipulating images. package images import ( diff --git a/tpl/inflect/inflect.go b/tpl/inflect/inflect.go index 31b22dbc..187f360d 100644 --- a/tpl/inflect/inflect.go +++ b/tpl/inflect/inflect.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package inflect provides template functions for the inflection of words. package inflect import ( diff --git a/tpl/lang/lang.go b/tpl/lang/lang.go index 4c011b1c..9a9f467b 100644 --- a/tpl/lang/lang.go +++ b/tpl/lang/lang.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package lang provides template functions for content internationalization. package lang import ( diff --git a/tpl/math/math.go b/tpl/math/math.go index fcc6abc3..0bc813dc 100644 --- a/tpl/math/math.go +++ b/tpl/math/math.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package math provides template functions for mathmatical operations. package math import ( diff --git a/tpl/os/os.go b/tpl/os/os.go index aca80ae9..cc4a42d5 100644 --- a/tpl/os/os.go +++ b/tpl/os/os.go @@ -11,6 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package os provides template functions for interacting with the operating +// system. package os import ( diff --git a/tpl/partials/partials.go b/tpl/partials/partials.go index dba0e501..39bb153e 100644 --- a/tpl/partials/partials.go +++ b/tpl/partials/partials.go @@ -11,6 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package partials provides template functions for working with reusable +// templates. package partials import ( diff --git a/tpl/path/path.go b/tpl/path/path.go index f975726c..64105522 100644 --- a/tpl/path/path.go +++ b/tpl/path/path.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package path provides template functions for manipulating paths. package path import ( diff --git a/tpl/resources/resources.go b/tpl/resources/resources.go index 8b30f315..a20b2e50 100644 --- a/tpl/resources/resources.go +++ b/tpl/resources/resources.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package resources provides template functions for working with resources. package resources import ( diff --git a/tpl/safe/safe.go b/tpl/safe/safe.go index 64c36cc4..4abd34e7 100644 --- a/tpl/safe/safe.go +++ b/tpl/safe/safe.go @@ -11,6 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package safe provides template functions for escaping untrusted content or +// encapsulating trusted content. package safe import ( diff --git a/tpl/strings/strings.go b/tpl/strings/strings.go index 1853cd72..91d533af 100644 --- a/tpl/strings/strings.go +++ b/tpl/strings/strings.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package strings provides template functions for manipulating strings. package strings import ( diff --git a/tpl/templates/init.go b/tpl/templates/init.go index a68809e6..8bc53ef4 100644 --- a/tpl/templates/init.go +++ b/tpl/templates/init.go @@ -11,7 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package partials +package templates import ( "github.com/gohugoio/hugo/deps" diff --git a/tpl/templates/init_test.go b/tpl/templates/init_test.go index d833cddc..9a0533fe 100644 --- a/tpl/templates/init_test.go +++ b/tpl/templates/init_test.go @@ -11,7 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package partials +package templates import ( "testing" diff --git a/tpl/templates/templates.go b/tpl/templates/templates.go index 7a69e28a..44d397e6 100644 --- a/tpl/templates/templates.go +++ b/tpl/templates/templates.go @@ -11,7 +11,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -package partials +// Package templates provides template functions for working with templates. +package templates import ( "github.com/gohugoio/hugo/deps" diff --git a/tpl/time/time.go b/tpl/time/time.go index d56c8540..59812464 100644 --- a/tpl/time/time.go +++ b/tpl/time/time.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package time provides template functions for measuring and displaying time. package time import ( diff --git a/tpl/transform/transform.go b/tpl/transform/transform.go index 7ec1fec0..777e31c3 100644 --- a/tpl/transform/transform.go +++ b/tpl/transform/transform.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package transform provides template functions for transforming content. package transform import ( diff --git a/tpl/urls/urls.go b/tpl/urls/urls.go index 7abf45ba..754114b2 100644 --- a/tpl/urls/urls.go +++ b/tpl/urls/urls.go @@ -11,6 +11,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package urls provides template functions to deal with URLs. package urls import ( -- 2.30.2