Skip to content

Commit

Permalink
Initial implementation (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhan005 authored Jun 5, 2021
1 parent cbb03b8 commit e08e718
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 47 deletions.
15 changes: 5 additions & 10 deletions README.md
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
4 changes: 2 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tasks:
desc: Build binary & Run
deps: [ build ]
cmds:
- ./.bin/go-template
- ./.bin/mebeats
sources:
- ./**/*.go

Expand All @@ -20,4 +20,4 @@ tasks:
cmds:
- go build -v
-trimpath
-o ./.bin/go-template
-o ./.bin/mebeats
2 changes: 1 addition & 1 deletion go.mod
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

Expand Down
34 changes: 0 additions & 34 deletions main.go

This file was deleted.

32 changes: 32 additions & 0 deletions mebeats.go
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
}

0 comments on commit e08e718

Please sign in to comment.