mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-11-12 08:36:36 -05:00
Feat/revive (#212)
* enable revive as linter * fix var-naming revive issues * fix blank-imports revive issues * fix receiver-naming revive issues * fix exported revive issues * fix indent-error-flow revive issues * fix unexported-return revive issues * fix indent-error-flow revive issues Signed-off-by: Fabian Kammel <fk@edgeless.systems>
This commit is contained in:
parent
2e93b354e4
commit
369480a50b
53 changed files with 206 additions and 204 deletions
|
|
@ -76,7 +76,7 @@ func main() {
|
|||
}
|
||||
sched := metadata.NewScheduler(log.Named("scheduler"), fetcher, ssh, download)
|
||||
serv := server.New(log.Named("server"), ssh, serviceManager, streamer)
|
||||
if err := deploy.DeployDefaultServiceUnit(ctx, serviceManager); err != nil {
|
||||
if err := deploy.DefaultServiceUnit(ctx, serviceManager); err != nil {
|
||||
log.Fatalf("%s", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -179,13 +179,13 @@ type fakeDownloadServer struct {
|
|||
pb.UnimplementedDebugdServer
|
||||
}
|
||||
|
||||
func (f *fakeDownloadServer) DownloadBootstrapper(request *pb.DownloadBootstrapperRequest, stream pb.Debugd_DownloadBootstrapperServer) error {
|
||||
for _, chunk := range f.chunks {
|
||||
func (s *fakeDownloadServer) DownloadBootstrapper(request *pb.DownloadBootstrapperRequest, stream pb.Debugd_DownloadBootstrapperServer) error {
|
||||
for _, chunk := range s.chunks {
|
||||
if err := stream.Send(&pb.Chunk{Content: chunk}); err != nil {
|
||||
return fmt.Errorf("sending chunk: %w", err)
|
||||
}
|
||||
}
|
||||
return f.downladErr
|
||||
return s.downladErr
|
||||
}
|
||||
|
||||
func (s *fakeDownloadServer) DownloadAuthorizedKeys(context.Context, *pb.DownloadAuthorizedKeysRequest) (*pb.DownloadAuthorizedKeysResponse, error) {
|
||||
|
|
|
|||
|
|
@ -146,8 +146,8 @@ func (s *ServiceManager) WriteSystemdUnitFile(ctx context.Context, unit SystemdU
|
|||
return nil
|
||||
}
|
||||
|
||||
// DeployDefaultServiceUnit will write the default "bootstrapper.service" unit file.
|
||||
func DeployDefaultServiceUnit(ctx context.Context, serviceManager *ServiceManager) error {
|
||||
// DefaultServiceUnit will write the default "bootstrapper.service" unit file.
|
||||
func DefaultServiceUnit(ctx context.Context, serviceManager *ServiceManager) error {
|
||||
if err := serviceManager.WriteSystemdUnitFile(ctx, SystemdUnit{
|
||||
Name: debugd.BootstrapperSystemdUnitName,
|
||||
Contents: debugd.BootstrapperSystemdUnitContents,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue