1. Задача: Просмотреть код, назвать, что выведется в stdout
package main
import (
"fmt"
"time"
)
type Agent struct {
ID int
Enabled bool
}
func (a Agent) Enable() {
a.Enabled = true
}
type Enabler interface {
Enable()
}
func main() {
agents := make([]Agent, 0, 5)
for i := 0; i < 2; i++ {
agents = append(agents, Agent{ID: i})
}
addThirdPartyAgents(agents)
pipe := make(chan Enabler)
go pipesend(pipe, agents)
go…