Skip to content

Commit

Permalink
feat: add banner
Browse files Browse the repository at this point in the history
  • Loading branch information
CorrectRoadH committed Dec 13, 2023
1 parent c3c7a3d commit 154b4d6
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 1 deletion.
19 changes: 19 additions & 0 deletions cmd/likit.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,36 @@
package cmd

import (
"fmt"

"github.com/CorrectRoadH/Likit/config"
"github.com/CorrectRoadH/Likit/internal/adapter/in/grpc"
"github.com/CorrectRoadH/Likit/internal/adapter/in/restful"
"github.com/CorrectRoadH/Likit/internal/adapter/in/restful/route"
"github.com/CorrectRoadH/Likit/internal/adapter/out/admin"
"github.com/CorrectRoadH/Likit/internal/adapter/out/database"
"github.com/CorrectRoadH/Likit/internal/application/server"
"github.com/CorrectRoadH/Likit/profile"
"go.uber.org/fx"
)

func Banner() {
fmt.Println(` ___
___ /__/| ___ ___
/ /\ | |:| / /\ / /\
___ ___ / /:/ | |:| / /:/ / /:/
/__/\ / /\ /__/::\ __| |:| /__/::\ / /:/
\ \:\ / /:/ \__\/\:\__ /__/\_|:|____ \__\/\:\__ / /::\
\ \:\ /:/ \ \:\/\ \ \:\/:::::/ \ \:\/\ /__/:/\:\
\ \:\/:/ \__\::/ \ \::/~~~~ \__\::/ \__\/ \:\
\ \::/ /__/:/ \ \:\ /__/:/ \ \:\
\__\/ \__\/ \ \:\ \__\/ \__\/
\__\/ `)
fmt.Println("Version: ", profile.CurrentProfile.Version)
}
func Main() {
Banner()

fx.New(
fx.Provide(
restful.NewRESTfulServer,
Expand Down
1 change: 1 addition & 0 deletions internal/adapter/out/database/kafka_adapter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package database
1 change: 1 addition & 0 deletions internal/adapter/out/database/mysql_adapter.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package database
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ var (
ErrUserNotVoted = errors.New("user has not voted")

ErrVoteEngineNotSupport = errors.New("vote engine not support")

ErrVoteEngineNotImplementFeature = errors.New("vote engine not implement feature")
)
2 changes: 1 addition & 1 deletion internal/port/in/basic_vote_use_case.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

type BasicVoteUseCase interface {
Check(ctx context.Context, config domain.Config) error
ID(ctx context.Context) string
Features(ctx context.Context)
Requires(ctx context.Context)

Init(ctx context.Context)
}
9 changes: 9 additions & 0 deletions profile/profile.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package profile

type Profile struct {
Version string
}

var CurrentProfile = Profile{
Version: "0.0.9",
}

0 comments on commit 154b4d6

Please sign in to comment.