this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cmd/cue: remove duplicate files from get_go_types.txt

This test includes a few expected output "golden" files for generated
CUE from "cue get go". So, for instance, pkg1/alias_go_gen.cue gets
generated and compared with the expected pkg1/alias_go_gen.cue.golden.

However, the regular output files are included too, for some reason.
It doesn't seem to serve any purpose, as the files are overwritten, and
they are practically duplicates; they just haven't been kept in sync,
as updating golden files via CUE_UPDATE left the other files to bit rot.

Change-Id: Ie92aac38b99471affba139222893b1de99191630
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/536196
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>

-147
-147
cmd/cue/cmd/testdata/script/get_go_types.txt
··· 217 217 import pkgtwo "example.com/pkg2" 218 218 219 219 type Barzer = pkgtwo.Barzer 220 - -- pkg1/alias_go_gen.cue -- 221 - // Code generated by cue get go. DO NOT EDIT. 222 - 223 - //cue:generate cue get go example.com/pkg1 224 - 225 - package pkg1 226 - 227 - import "example.com/pkg2" 228 - 229 - #MyBarzer: pkgtwo.#Barzer 230 - -- pkg1/file1_go_gen.cue -- 231 - // Code generated by cue get go. DO NOT EDIT. 232 - 233 - //cue:generate cue get go example.com/pkg1 234 - 235 - // block comment 236 - package pkg1 237 - 238 - import ( 239 - "time" 240 - p2 "example.com/pkg2:pkgtwo" 241 - ) 242 - 243 - // Foozer foozes a jaman. 244 - #Foozer: { 245 - Int: int 246 - String: string 247 - 248 - #Inline 249 - NoInline: #NoInline 250 - CustomJSON: #CustomJSON 251 - CustomYAML?: null | #CustomYAML @go(,*CustomYAML) 252 - AnyJSON: _ @go(,json.Marshaler) 253 - AnyText: string @go(,encoding.TextMarshaler) 254 - bar?: int & >10 @go(Bar) 255 - 256 - // Time is mapped to CUE's internal type. 257 - Time: time.Time 258 - Barzer: p2.#Barzer 259 - Alias1?: null | p2.#Barzer @go(,*p2.Barzer) 260 - Map: {[string]: null | #CustomJSON} @go(,map[string]*CustomJSON) 261 - Slice1: [...int] @go(,[]int) 262 - Slice2: [...] @go(,[]interface{}) 263 - Slice3?: null | [...] @go(,*[]json.Unmarshaler) 264 - Array1: 5 * [int] @go(,[5]int) 265 - Array2: 5 * [_] @go(,[5]interface{}) 266 - Array3?: null | 5*[_] @go(,*[5]json.Marshaler) 267 - Intf: #Interface @protobuf(2,varint,name=intf) 268 - Intf2: _ @go(,interface{}) 269 - Intf3: { 270 - Interface: #Interface 271 - } @go(,struct{Interface}) 272 - Intf4: _ @go(,"interface{Foo()}") 273 - 274 - // Even though this struct as a type implements MarshalJSON, it is known 275 - // that it is really only implemented by the embedded field. 276 - Embed: { 277 - CustomJSON: #CustomJSON 278 - } @go(,struct{CustomJSON}) 279 - } 280 - 281 - #Identifier: string // #enumIdentifier 282 - 283 - #enumIdentifier: 284 - _#internalIdentifier 285 - 286 - _#internalIdentifier: #Identifier & "internal" 287 - 288 - // Level gives an indication of the extent of stuff. 289 - #Level: int // #enumLevel 290 - 291 - #enumLevel: 292 - #Unknown | 293 - #Low | 294 - #Medium | 295 - #High 296 - 297 - // Block comment. 298 - // Indented. 299 - // 300 - // Empty line before. 301 - #Unknown: #Level & 0 302 - #Low: #Level & 1 303 - 304 - // Medium is neither High nor Low 305 - #Medium: #Level & 2 306 - #High: #Level & 3 307 - 308 - #CustomJSON: _ 309 - 310 - #CustomYAML: { 311 - } 312 - 313 - _#localType: int 314 - 315 - _#localConst: _#localType & 1 316 - 317 - #Inline: Kind: string 318 - 319 - #NoInline: Kind: string 320 - 321 - #Interface: _ 322 - -- pkg2/pkg2_go_gen.cue -- 323 - // Code generated by cue get go. DO NOT EDIT. 324 - 325 - //cue:generate cue get go example.com/pkg2 326 - 327 - // Package pkgtwo does other stuff. 328 - package pkgtwo 329 - 330 - import t "time" 331 - 332 - // A Barzer barzes. 333 - #Barzer: { 334 - a: int @go(A) @protobuf(2,varint,) 335 - T: t.Time 336 - B?: null | int @go(,*big.Int) 337 - C: int @go(,big.Int) 338 - F: string @go(,big.Float) @xml(,attr) 339 - G?: null | string @go(,*big.Float) 340 - S: string 341 - "x-y": bool @go(XY) 342 - Err: _ @go(,error) 343 - 344 - #Inline 345 - } 346 - 347 - #Perm: 0o755 348 - 349 - #Few: 3 350 - 351 - #Couple: int & 2 352 - 353 - #LongStringConst: "This is a really long string. Why are we using a long string? Because that way it ensures we are using go/constant.Value.ExactString() instead of go/constant.Value.String()" 354 - 355 - #Inline: A: int 356 - -- pkg3/pkg3_go_gen.cue -- 357 - // Code generated by cue get go. DO NOT EDIT. 358 - 359 - //cue:generate cue get go example.com/pkg3 360 - 361 - package pkg3 362 - 363 - import "example.com/pkg2:pkgtwo" 364 - 365 - #Barzer: pkgtwo.#Barzer 366 - 367 220 -- pkg1/alias_go_gen.cue.golden -- 368 221 // Code generated by cue get go. DO NOT EDIT. 369 222