Skip to content

Commit

Permalink
fix: 调整 memory
Browse files Browse the repository at this point in the history
  • Loading branch information
Lack30 committed Feb 7, 2023
1 parent 941feca commit 89234a9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ import (
"github.com/vine-io/gpm/pkg/internal/store"
"github.com/vine-io/gpm/pkg/service"
"github.com/vine-io/pkg/release"
"github.com/vine-io/vine/core/registry"
"github.com/vine-io/vine/core/registry/memory"
"github.com/vine-io/vine/lib/api/handler/openapi"

"github.com/vine-io/cli"
Expand Down Expand Up @@ -101,7 +103,14 @@ func (s *GpmAPI) Init() error {

var clisrc source.Source

mr := memory.NewRegistry()
if err = mr.Init(); err != nil {
return err
}
registry.DefaultRegistry = mr

opts := []vine.Option{
vine.Registry(mr),
vine.Name(internal.GpmName),
vine.ID(internal.GpmId),
vine.Version(internal.GetVersion()),
Expand Down

0 comments on commit 89234a9

Please sign in to comment.