Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/Hristiyan-Bonev/golang-course/sort

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/Hristiyan-Bonev/golang-course/sort

  • v0.0.0-20210618081303-747750048936
  • Source
  • Go
  • Socket score

Version published
Created
Source

sort-system-v1

This is the first version of the SORT system we'll be building in the course.

How to run the project

  • make grpc-compile to generate all grpc-related files in the gen/ folder
  • Enter sorting-service and type go run *.go

(Optional) Name your project the way you like

  • Modify the following files and change the repository reference from github.com/bbsbb/go-at-ocado/sort-vX to your own repo:
    • go.mod
    • Makefile.GRPC
    • all files in the idl directory
    • sorting-service/go.mod, sorting-service/main.go, sorting-service/service.go

Assignment

In this part of the project, we'll be building the initial version of the sorting service.

Implement the following:

  • LoadItems - loads an input array of items in the service. E.g. ["tomatoes", "cucumber", "potato", "cheese"]
  • SelectItem -> Choose an item at random from the remaining ones in the array. E.g. choose "tomatoes" at random && remove item from existing array
  • MoveItem -> Move the selected item in the input cubby. Simply return "Success" here.

Return an error in any of the following cases:

  • SelectItem is invokes but there are no items in input bin
  • MoveItem is invoked but no item is selected yet
  • SelectItem is invoked when an item is already selected

FAQs

Package last updated on 18 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc