OSDN Git Service

Regular updates
authorErik <erikgronwal@users.osdn.me>
Wed, 4 Jan 2023 14:55:06 +0000 (23:55 +0900)
committerErik <erikgronwal@users.osdn.me>
Wed, 4 Jan 2023 14:55:06 +0000 (23:55 +0900)
gnupg.md
go.md
react.md
vim.md

index 0ee1b8b..9395e4c 100644 (file)
--- a/gnupg.md
+++ b/gnupg.md
@@ -103,7 +103,7 @@ gpg --keyserver <URL> ...
 ```bash
 gpg --edit-key <KEY ID>
 # In the interactive prompt:
-gpg> sign
+gpg> trust
 gpg> save
 ```
 
diff --git a/go.md b/go.md
index 1ca0142..830b4ab 100644 (file)
--- a/go.md
+++ b/go.md
@@ -51,19 +51,52 @@ Or try it out in the [Go repl](https://repl.it/languages/go), or [A Tour of Go](
 
 ```go
 var msg string
+var msg = "Hello, world!"
+var msg string = "Hello, world!"
+var x, y int
+var x, y int = 1, 2
+var x, msg = 1, "Hello, world!"
 msg = "Hello"
 ```
 
+#### Declaration list
+
+``` go
+var (
+  x int
+  y = 20
+  z int = 30
+  d, e = 40, "Hello"
+  f, g string
+)
+```
+
 #### Shortcut of above (Infers type)
 
 ```go
 msg := "Hello"
+x, msg := 1, "Hello"
 ```
 
 ### Constants
 
 ```go
 const Phi = 1.618
+const Size int64 = 1024
+const x, y = 1, 2
+const (
+  Pi = 3.14
+  E  = 2.718
+)
+const (
+  Sunday = iota
+  Monday
+  Tuesday
+  Wednesday
+  Thursday
+  Friday
+  Saturday
+)
 ```
 
 Constants can be character, string, boolean, or numeric values.
index 7626e5a..9a0d57a 100644 (file)
--- a/react.md
+++ b/react.md
@@ -341,6 +341,8 @@ See: [Hooks at a Glance](https://reactjs.org/docs/hooks-overview.html)
 ### Declaring multiple state variables
 
 ```jsx
+import React, { useState } from 'react';
+
 function ExampleWithManyStates() {
   // Declare multiple state variables!
   const [age, setAge] = useState(42);
diff --git a/vim.md b/vim.md
index a1cdfc7..ba3f464 100644 (file)
--- a/vim.md
+++ b/vim.md
@@ -66,12 +66,14 @@ Getting started
 
 #### Document
 
-| Shortcut | Description    |
-| ---      | ---            |
-| `gg`     | First line     |
-| `G`      | Last line      |
-| `:n`     | Go to line `n` |
-| `nG`     | Go to line `n` |
+| Shortcut    | Description              |
+| ---         | ---                      |
+| `gg`        | First line               |
+| `G`         | Last line                |
+| `:{number}` | Go to line `{number}`    |
+| `{number}G` | Go to line `{number}`    |
+| `{number}j` | Go down `{number}` lines |
+| `{number}k` | Go up `{number}` lines   |
 {: .-shortcuts}
 
 #### Window