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

Commit

Permalink
tools/trim: fix package doc
Browse files Browse the repository at this point in the history
Currently the doc for `tools/trim` at https://godoc.org/cuelang.org/go shows:

> light: ceiling50: { room: "MasterBedroom" brightnessOff: 0.0 // this line brightnessOn: 100.0 // and this line will be removed }

This is due to a couple of blank lines in the `tools/trim` package comment.

This PR fixes that, and a couple of typos.

Closes #387
#387

GitOrigin-RevId: 4943d4c
Change-Id: I1c4e42e656b94698670678ec26e49663220133cc
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6160
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
  • Loading branch information
twpayne authored and mpvl committed May 20, 2020
1 parent 86e1a64 commit be60cd9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tools/trim/trim.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package trim removes defintiions that may be inferred from
// Package trim removes definitions that may be inferred from
// templates.
//
// trim removes fields from structs that can be inferred from constraints

// A field, struct, or list is removed if it is implied by a constraint, such
// as from an optional field maching a required field, a list type value,
// as from an optional field matching a required field, a list type value,
// a comprehension or any other implied content. It will modify the files in place.

//
// Limitations
//
// Removal is on a best effort basis. Some caveats:
Expand All @@ -29,15 +27,15 @@
// - Disjunctions that contain structs in implied content cannot be used to
// remove fields.
// - There is currently no verification step: manual verification is required.

//
// Examples:
//
// light: [string]: {
// room: string
// brightnessOff: *0.0 | >=0 & <=100.0
// brightnessOn: *100.0 | >=0 & <=100.0
// }

//
// light: ceiling50: {
// room: "MasterBedroom"
// brightnessOff: 0.0 // this line
Expand Down

0 comments on commit be60cd9

Please sign in to comment.