lms

package
v0.0.0-...-e3ce55c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const NameSeparator = "#"

Variables

This section is empty.

Functions

func AddingBook

func AddingBook(l *Library)

func BorrowBook

func BorrowBook(l *Library)

func IsSameBook

func IsSameBook(b1, b2 Book) bool

Checks is book is same or not

func LoadBooks

func LoadBooks(lib *Library) bool

func RemoveBook

func RemoveBook(l *Library)

func SaveLms

func SaveLms(lib *Library)

func StartLms

func StartLms()

func SubmitBook

func SubmitBook(l *Library)

func TakeNameAndAuthor

func TakeNameAndAuthor() (name, author string)

Types

type Book

type Book struct {
	Name   string
	Author string
}

func NewBook

func NewBook(name, author string) Book

This function create new book

func (Book) String

func (b Book) String() string

type Library

type Library struct {
	// contains filtered or unexported fields
}

func NewLibrary

func NewLibrary() Library

for creating new library

func (*Library) AddBook

func (l *Library) AddBook(name, author string)

adding books to library

func (*Library) BorrowBook

func (l *Library) BorrowBook(name, author string) bool

func (*Library) RemoveBook

func (l *Library) RemoveBook(name, author string) bool

func (Library) String

func (l Library) String() string

func (*Library) SubmitBook

func (l *Library) SubmitBook(name, author string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL