You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/10/02 21:07:18 UTC

[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5095: Update Go version to 1.15.2

zrhoffman commented on a change in pull request #5095:
URL: https://github.com/apache/trafficcontrol/pull/5095#discussion_r499050784



##########
File path: docs/source/_ext/atc.py
##########
@@ -46,6 +46,29 @@ def run(self):
 			impl_node.append(nodes.paragraph('', '', *(n + m)))
 		return [impl_node]
 
+# -- Go Version role --------------------------------------------------
+# Returns the value of the Go version stored in GO_VERSION to minor version
+# precision.
+import os
+import re
+
+from docutils.nodes import strong
+from docutils.parsers.rst.states import Inliner
+from typing import Tuple, List
+
+def atc_go_version(unused_typ: str,
+               unused_rawtext: str,
+               unused_text: str,
+               unused_lineno: int,
+               unused_inliner: Inliner,
+               options=None,
+               content=None) -> Tuple[List[strong], list]:
+	go_version_file = os.path.join(os.path.dirname(__file__), '../../../GO_VERSION')
+	go_version = open(file=go_version_file).read()

Review comment:
       Reading with *with* in 6483fa1d46




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org