Adding common sourceLabels func#720
Conversation
a27f264 to
5e08831
Compare
| package source | ||
|
|
||
| const ( | ||
| sourceLabelKey = "eventing.knative.dev/source" |
There was a problem hiding this comment.
I would rather this be sources.knative.dev/controller
|
|
||
| const ( | ||
| sourceLabelKey = "eventing.knative.dev/source" | ||
| sourceNameLabelKey = "eventing.knative.dev/sourceName" |
There was a problem hiding this comment.
I would rather this be sources.knative.dev/name
|
sources.eventing.kn...?
or „just“ sources.knative....
On Wed 25. Sep 2019 at 19:07, Scott Nichols ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In source/source_labels.go
<#720 (comment)>:
> + * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package source
+
+const (
+ sourceLabelKey = "eventing.knative.dev/source"
+ sourceNameLabelKey = "eventing.knative.dev/sourceName"
I would rather this be sources.knative.dev/name
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#720?email_source=notifications&email_token=AABGPTWQWXUJZSOHHYNLAOLQLOLDVA5CNFSM4I2IXHR2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCF5FP4Y#pullrequestreview-293230579>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABGPTVOFZHINKXXJRH4ZBLQLOLDVANCNFSM4I2IXHRQ>
.
--
Sent from Gmail Mobile
|
5e08831 to
3068c33
Compare
|
@n3wscott thanks for the review - I've updated this |
|
/lgtm |
|
@mattmoor mind taking a look ? |
|
|
||
| eq := cmp.Equal(sourceLables, wantTags) | ||
| if !eq { | ||
| t.Fatalf("Not equal") |
There was a problem hiding this comment.
No format directive, print the diff or the objects?
| sourceName = "sources.knative.dev/name" | ||
| ) | ||
|
|
||
| func SourceLabels(name, controllerAgentName string) map[string]string { |
There was a problem hiding this comment.
The function name has what Go folks call "stutter" because of the package name: source.SourceLabels. I would just drop the Source: source.Labels.
This could also use a detailed doc string, since I assume it's being put here for Source authors?
|
@mattmoor thanks for the feedback! I've updated my PR 🤗 |
3068c33 to
9d7f524
Compare
9d7f524 to
fdc7ccc
Compare
mattmoor
left a comment
There was a problem hiding this comment.
/lgtm
/approve
/hold
For the nit.
|
|
||
| eq := cmp.Equal(sourceLables, wantTags) | ||
| if !eq { | ||
| t.Fatalf("%v is not equal to %v", sourceLables, wantTags) |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mattmoor, matzew, n3wscott The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
The following is the coverage report on the affected files.
|
|
/hold cancel
On Tue 1. Oct 2019 at 16:17, Knative Prow Robot ***@***.***> wrote:
New changes are detected. LGTM label has been removed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#720?email_source=notifications&email_token=AABGPTXVDNGADO7USB7DR3TQMNK7RA5CNFSM4I2IXHR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEABM6HY#issuecomment-537055007>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABGPTR445KTUGIHH4K4G23QMNK7RANCNFSM4I2IXHRQ>
.
--
Sent from Gmail Mobile
|
|
@mattmoor mind doing another |
|
/lgtm |
/assign @n3wscott