All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: andrey1s <andrey@4devs.pro> Reviewed-on: #1 Co-authored-by: andrey <andrey@4devs.io> Co-committed-by: andrey <andrey@4devs.io>
27 lines
392 B
Go
27 lines
392 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"syscall"
|
|
|
|
"gitoa.ru/go-4devs/closer"
|
|
"gitoa.ru/go-4devs/console"
|
|
"gitoa.ru/go-4devs/mime/scripts/command"
|
|
)
|
|
|
|
func main() {
|
|
ctx, cancel := context.WithCancel(context.Background())
|
|
|
|
closer.AddLast(func() error {
|
|
cancel()
|
|
|
|
return nil
|
|
})
|
|
|
|
go func() {
|
|
closer.Wait(ctx, syscall.SIGTERM, syscall.SIGINT)
|
|
}()
|
|
|
|
console.Execute(ctx, command.Mime())
|
|
}
|