Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change signature on pr.GetOwnerReference() #2392

Commits on Apr 14, 2020

  1. Change signature on GetOwnerReference

    A small refactoring of PipelineRun function. Change signature so it corresponds with the name.
    From:
    
        func (pr *PipelineRun) GetOwnerReference() []metav1.OwnerReference
    
    To:
    
        func (pr *PipelineRun) GetOwnerReference() metav1.OwnerReference
    
     This signature change leads to more _idiomatic code_ and avoids code like:
    
         pr.GetOwnerReference()[0]
    
     to be replaced with:
    
         pr.GetOwnerReference()
    
     This is a small Go function API change, but it does not change the type structure API (e.g. Yaml). Code that before this change used
    
         pr.GetOwnerReference()
    
     need to change the function call to
    
         []metav1.OwnerReference{pr.GetOwnerReference()}
    jlpettersson committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    83185f9 View commit details
    Browse the repository at this point in the history