From 1eee88203e3e9fc52aa551463d47d6a9017ab659 Mon Sep 17 00:00:00 2001 From: CodeLingo Bot Date: Sun, 17 Feb 2019 20:19:08 +0000 Subject: [PATCH] Fix function comments based on best practices from Effective Go Signed-off-by: CodeLingo Bot --- inject.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inject.go b/inject.go index 3ff713c..95d9d0d 100644 --- a/inject.go +++ b/inject.go @@ -102,7 +102,7 @@ func (inj *injector) Invoke(f interface{}) ([]reflect.Value, error) { return reflect.ValueOf(f).Call(in), nil } -// Maps dependencies in the Type map to each field in the struct +// Apply: Maps dependencies in the Type map to each field in the struct // that is tagged with 'inject'. // Returns an error if the injection fails. func (inj *injector) Apply(val interface{}) error { @@ -136,7 +136,7 @@ func (inj *injector) Apply(val interface{}) error { return nil } -// Maps the concrete value of val to its dynamic type using reflect.TypeOf, +// Map: Maps the concrete value of val to its dynamic type using reflect.TypeOf, // It returns the TypeMapper registered in. func (i *injector) Map(val interface{}) TypeMapper { i.values[reflect.TypeOf(val)] = reflect.ValueOf(val) @@ -148,7 +148,7 @@ func (i *injector) MapTo(val interface{}, ifacePtr interface{}) TypeMapper { return i } -// Maps the given reflect.Type to the given reflect.Value and returns +// Set: Maps the given reflect.Type to the given reflect.Value and returns // the Typemapper the mapping has been registered in. func (i *injector) Set(typ reflect.Type, val reflect.Value) TypeMapper { i.values[typ] = val