2016-11-04 07:43:04 +02:00
|
|
|
// Copyright 2016 The Go Authors. All rights reserved.
|
2016-11-04 07:42:22 +02:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2016-11-07 23:01:35 +02:00
|
|
|
"log"
|
2016-11-04 07:42:22 +02:00
|
|
|
"time"
|
|
|
|
|
2016-11-07 23:01:35 +02:00
|
|
|
"github.com/google/gops/agent"
|
2016-11-04 07:42:22 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2017-09-12 04:50:16 +02:00
|
|
|
if err := agent.Listen(agent.Options{
|
|
|
|
ShutdownCleanup: true, // automatically closes on os.Interrupt
|
|
|
|
}); err != nil {
|
2016-11-07 23:01:35 +02:00
|
|
|
log.Fatal(err)
|
|
|
|
}
|
2016-11-04 07:42:22 +02:00
|
|
|
time.Sleep(time.Hour)
|
|
|
|
}
|