Skip to content

Commit

Permalink
Enable gofmt CI against new directories by default. (#793)
Browse files Browse the repository at this point in the history
Co-authored-by: Wen Bo Li <[email protected]>
  • Loading branch information
robshakir and wenovus authored Mar 23, 2023
1 parent 0259101 commit b519912
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:
- name: Gofmt
run: |
for i in util ygot ygen ytypes ygot/pathtranslate testutil testcmp ypathgen; do
for i in `find . -type d | egrep -v "exampleoc|demo|proto|uexampleoc"`; do
diff -u <(echo -n) <(gofmt -d -s ./$i)
done
Expand Down
44 changes: 23 additions & 21 deletions gnmidiff/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,31 @@ import (
// Output path format is per gNMI's path conventions.
//
// e.g.
// {
// "openconfig-network-instance:config": {
// "description": "VRF RED",
// "enabled": true,
// "enabled-address-families": [
// "openconfig-types:IPV4",
// "openconfig-types:IPV6"
// ],
// "name": "RED",
// "type": "openconfig-network-instance-types:L3VRF"
// },
// "openconfig-network-instance:name": "RED"
// }
//
// {
// "openconfig-network-instance:config": {
// "description": "VRF RED",
// "enabled": true,
// "enabled-address-families": [
// "openconfig-types:IPV4",
// "openconfig-types:IPV6"
// ],
// "name": "RED",
// "type": "openconfig-network-instance-types:L3VRF"
// },
// "openconfig-network-instance:name": "RED"
// }
//
// returns
// {
// "openconfig-network-instance:config/description": "VRF RED",
// "openconfig-network-instance:config/enabled": true,
// "openconfig-network-instance:config/enabled-address-families": ["openconfig-types:IPV4", "openconfig-types:IPV6"],
// "openconfig-network-instance:config/name": "RED",
// "openconfig-network-instance:config/type": "openconfig-network-instance-types:L3VRF",
// "openconfig-network-instance:name": "RED",
// }
//
// {
// "openconfig-network-instance:config/description": "VRF RED",
// "openconfig-network-instance:config/enabled": true,
// "openconfig-network-instance:config/enabled-address-families": ["openconfig-types:IPV4", "openconfig-types:IPV6"],
// "openconfig-network-instance:config/name": "RED",
// "openconfig-network-instance:config/type": "openconfig-network-instance-types:L3VRF",
// "openconfig-network-instance:name": "RED",
// }
//
// When keepNamespace=false, then any namespace is removed from the flattened
// *paths*, but still kept in any identity values.
Expand Down

0 comments on commit b519912

Please sign in to comment.