Skip to content

Commit

Permalink
Merge pull request #84664 from seans3/python-string-replace
Browse files Browse the repository at this point in the history
Fixes error in go_pkg()
  • Loading branch information
k8s-ci-robot committed Nov 2, 2019
2 parents 61200c9 + fe06de1 commit 6c75316
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build/code_generation.bzl
Expand Up @@ -41,7 +41,8 @@ def go_pkg(pkg):
...
)
"""
return go_prefix + "/" + pkg.replace("staging/src/", "vendor/", maxsplit = 1)
count = 1
return go_prefix + "/" + pkg.replace("staging/src/", "vendor/", count)

def openapi_deps():
deps = [
Expand All @@ -59,7 +60,7 @@ def applies(pkg, prefixes, default):
return True
return False

def gen_openapi(outs, output_pkg, include_pkgs=[], exclude_pkgs=[]):
def gen_openapi(outs, output_pkg, include_pkgs = [], exclude_pkgs = []):
"""Calls openapi-gen to produce the zz_generated.openapi.go file,
which should be provided in outs.
output_pkg should be set to the full go package name for this generated file.
Expand Down

0 comments on commit 6c75316

Please sign in to comment.