1

I don't get the idea of one line of golang code in kunbernets code

var (
    _ = Queue(&FIFO{}) // FIFO is a Queue
)
Jack Liu Shurui
  • 540
  • 1
  • 5
  • 14
  • 5
    Perhaps it's a way to confirm that FIFO satisfies the interface, Queue. If a maintainer changes things so that FIFO does not satisfy the interface, the compiler will prevent the program from being built and clearly describe the problem. – ctt May 07 '19 at 01:12
  • 2
    Ctt, Thanks. I googled the internet according to your answer. It is the case. – Jack Liu Shurui May 07 '19 at 01:26

0 Answers0