See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| if there is any concurrency in the code i should check if there is no race | |
| go run -race src/main.go | |
| and compiler will show if there are any races |
| DEFINING | |
| in interfaces we are definig behaviors | |
| func main() { | |
| var consoleWriter ConsoleWriter = ConsoleWriter{} | |
| consoleWriter.Write("siemanko!") | |
| } | |
| type Writer interface { |
| BASIC VIEW: | |
| func name(paramerters) whatToReturn { | |
| //body | |
| return whatToReturn | |
| } | |
| ----------------------- | |
| PASSING PARAMETERS |
| PROGRAM LAYOUT: | |
| package main | |
| import ( ..) -> import of libs | |
| const ... | |
| var ... | |
| func init(){} -> function which be intilized before executing main program |
| import org.springframework.data.mongodb.repository.Query; | |
| @Repository | |
| public interface BookRepository extends MongoRepository<Book, Integer> { | |
| @Query("{'author' : ?0}") //import org.springframework.data.mongodb.repository.Query; | |
| List<Book> findByAuthor(String author); | |
| } | |
| // documentation: https://docs.spring.io/spring-data/mongodb/docs/current/reference/html/#mongo.repositories |