Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Use %q instead of "%s" #2279

Merged

Conversation

jarifibrahim
Copy link
Member

This PR replaces all occurrences of \"%s\" with %q.
From the documentation of https://golang.org/pkg/fmt/

%q	a double-quoted string safely escaped with Go syntax

See an example here
https://play.golang.org/p/V62BVV_YK9K

@jarifibrahim jarifibrahim self-assigned this Sep 10, 2018
@codecov-io
Copy link

codecov-io commented Sep 10, 2018

Codecov Report

Merging #2279 into master will not change coverage.
The diff coverage is 50%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2279   +/-   ##
=======================================
  Coverage   69.47%   69.47%           
=======================================
  Files         175      175           
  Lines       16466    16466           
=======================================
  Hits        11439    11439           
  Misses       3927     3927           
  Partials     1100     1100
Impacted Files Coverage Δ
controller/work_item_events.go 77.63% <0%> (ø) ⬆️
space/space.go 64.65% <100%> (ø) ⬆️
workitem/simple_type.go 82.66% <100%> (ø) ⬆️
workitem/link/link_repository.go 72.98% <100%> (ø) ⬆️
spacetemplate/importer/repository.go 73.73% <100%> (ø) ⬆️
workitem/field_definition.go 82.3% <100%> (ø) ⬆️
workitem/workitem_repository.go 68.06% <33.33%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f057eb...91dcf95. Read the comment docs.

@jarifibrahim
Copy link
Member Author

[test]

Copy link
Contributor

@baijum baijum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jarifibrahim jarifibrahim merged commit 162bc65 into fabric8-services:master Sep 10, 2018
@jarifibrahim jarifibrahim deleted the use-q-instead-of-quotes branch September 10, 2018 07:45
baijum added a commit to baijum/saas-openshiftio that referenced this pull request Sep 10, 2018
# About
This description was generated using this script:
```sh
#!/bin/bash
set -e
GHORG=${GHORG:-fabric8-services}
GHREPO=${GHREPO:-fabric8-wit}
cat <<EOF
# About
This description was generated using this script:
\`\`\`sh
`cat $0`
\`\`\`
Invoked as:

    `echo GHORG=${GHORG} GHREPO=${GHREPO} $(basename $0) ${@:1}`

# Changes
EOF
git log \
  --pretty="%n**Commit:** https://github.com/${GHORG}/${GHREPO}/commit/%H%n**Author:** %an (%ae)%n**Date:** %aI%n%n%s%n%n%b%n%n----%n" \
    --reverse ${@:1} \
  | sed -E "s/([\s|\(| ])#([0-9]+)/\1${GHORG}\/${GHREPO}#\2/g"
```
Invoked as:

    GHORG=fabric8-services GHREPO=fabric8-wit osio-pull.sh 4909a90aef93ad7efc600faa43e7f0037a04de54..upstream/master

# Changes

**Commit:** fabric8-services/fabric8-wit@1f5acd8
**Author:** Konrad Kleine (193408+kwk@users.noreply.github.com)
**Date:** 2018-09-07T18:09:54+02:00

Make the board column tests cleanup after themselves (fabric8-services/fabric8-wit#2278)

Possibly related to openshiftio/openshift.io#4299

----


**Commit:** fabric8-services/fabric8-wit@5f057eb
**Author:** Xavier Coulon (xcoulon@redhat.com)
**Date:** 2018-09-10T07:14:15+02:00

Provide endpoint to list spaces in which a user has a role (fabric8-services/fabric8-wit#2260)

* Provide endpoint to list spaces in which a user has a role

Added endpoint in `UserController`
Added tests in `user_blackbox_test.go` using go-vcr
to handle requests/responses with remote auth service.

fixes fabric8-services/fabric8-wit#2241
fixes fabric8-services/fabric8-auth#617
fixes openshiftio/openshift.io#3760

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>


----


**Commit:** fabric8-services/fabric8-wit@162bc65
**Author:** Ibrahim Jarif (jarifibrahim@gmail.com)
**Date:** 2018-09-10T13:15:37+05:30

Use %q instead of "%s" (fabric8-services/fabric8-wit#2279)

This commit replaces all occurrences of \"%s\" with %q.
From the documentation of https://golang.org/pkg/fmt/

`%q	a double-quoted string safely escaped with Go syntax`


----


**Commit:** fabric8-services/fabric8-wit@164762f
**Author:** Baiju Muthukadan (baiju.m.mail@gmail.com)
**Date:** 2018-09-10T13:52:35+05:30

Search by label name (fabric8-services/fabric8-wit#2277)

Fixes work item no. 483

Syntax: `{"label.name":"somelabel"}`

----
kwk pushed a commit to openshiftio/saas-openshiftio that referenced this pull request Sep 10, 2018
# Changes

**Commit:** fabric8-services/fabric8-wit@1f5acd8
**Author:** Konrad Kleine (193408+kwk@users.noreply.github.com)
**Date:** 2018-09-07T18:09:54+02:00

Make the board column tests cleanup after themselves (fabric8-services/fabric8-wit#2278)

Possibly related to openshiftio/openshift.io#4299

----

**Commit:** fabric8-services/fabric8-wit@5f057eb
**Author:** Xavier Coulon (xcoulon@redhat.com)
**Date:** 2018-09-10T07:14:15+02:00

Provide endpoint to list spaces in which a user has a role (fabric8-services/fabric8-wit#2260)

* Provide endpoint to list spaces in which a user has a role

Added endpoint in `UserController`
Added tests in `user_blackbox_test.go` using go-vcr
to handle requests/responses with remote auth service.

fixes fabric8-services/fabric8-wit#2241
fixes fabric8-services/fabric8-auth#617
fixes openshiftio/openshift.io#3760

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>

----

**Commit:** fabric8-services/fabric8-wit@162bc65
**Author:** Ibrahim Jarif (jarifibrahim@gmail.com)
**Date:** 2018-09-10T13:15:37+05:30

Use %q instead of "%s" (fabric8-services/fabric8-wit#2279)

This commit replaces all occurrences of \"%s\" with %q.
From the documentation of https://golang.org/pkg/fmt/

`%q	a double-quoted string safely escaped with Go syntax`

----

**Commit:** fabric8-services/fabric8-wit@164762f
**Author:** Baiju Muthukadan (baiju.m.mail@gmail.com)
**Date:** 2018-09-10T13:52:35+05:30

Search by label name (fabric8-services/fabric8-wit#2277)

Fixes work item no. 483

Syntax: `{"label.name":"somelabel"}`

----
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants