generated from wuhan005/go-template
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
40 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
# 🐭 go-template ![Go](https://github.com/wuhan005/Elaina/workflows/Go/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/wuhan005/go-template)](https://goreportcard.com/report/github.com/wuhan005/go-template) | ||
# 💓 mebeats ![Go](https://github.com/wuhan005/mebeats/workflows/Go/badge.svg) [![Go Report Card](https://goreportcard.com/badge/github.com/wuhan005/mebeats)](https://goreportcard.com/report/github.com/wuhan005/mebeats) | ||
|
||
My Go Project Template | ||
Your Soul, Your Beats! | ||
|
||
## Start | ||
|
||
* Update `README.md`. | ||
* Choose a cool emoji. | ||
* Rename the project. | ||
* Update the Go badge, Go report card badge. | ||
* Update the project description. | ||
* Choose a friendly open source license. | ||
* Rename the package in `go.mod`. | ||
* Inspire the world! | ||
TBD | ||
|
||
## License | ||
|
||
MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module github.com/wuhan005/go-template | ||
module github.com/wuhan005/mebeats | ||
|
||
go 1.16 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2021 E99p1ant. All rights reserved. | ||
// Use of this source code is governed by a MIT-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package main | ||
|
||
import ( | ||
"flag" | ||
"os" | ||
"os/signal" | ||
"syscall" | ||
|
||
log "unknwon.dev/clog/v2" | ||
) | ||
|
||
func main() { | ||
defer log.Stop() | ||
err := log.NewConsole() | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
deviceName := flag.String("device-name", "", "Mi Band device name.") | ||
_ = flag.String("auth-key", "", "Mi Band auth key.") | ||
flag.Parse() | ||
|
||
log.Trace("Try to connect %q...", *deviceName) | ||
|
||
sig := make(chan os.Signal, 1) | ||
signal.Notify(sig, os.Interrupt, syscall.SIGTERM) | ||
<-sig | ||
} |