From 941b4caf576ac7997a44911d0253dba5cd776dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 10 Mar 2016 20:59:41 +0100 Subject: [PATCH] tpl: Add Copyright reference to the Go authors Also a reference to the `index`issue in Go's issue tracker. --- tpl/template_funcs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tpl/template_funcs.go b/tpl/template_funcs.go index c0ed9bb31..3e21e81d6 100644 --- a/tpl/template_funcs.go +++ b/tpl/template_funcs.go @@ -1,5 +1,7 @@ // Copyright 2015 The Hugo Authors. All rights reserved. // +// Portions Copyright The Go Authors. + // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at @@ -1326,6 +1328,7 @@ func prepareArg(value reflect.Value, argType reflect.Type) (reflect.Value, error // indexed item must be a map, slice, or array. // // Copied from Go stdlib src/text/template/funcs.go. +// Can hopefully be removed in Go 1.7, see https://github.com/golang/go/issues/14751 func index(item interface{}, indices ...interface{}) (interface{}, error) { v := reflect.ValueOf(item) if !v.IsValid() {