-
download tar file, choose a Golang version and replace it (go1.16.5)
curl -O https://storage.googleapis.com/golang/go1.16.5.linux-amd64.tar.gz
-
extract tar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[test] | |
fn generic_into_iterator() { | |
fn f1<'a, I, T>(iter: I) | |
where | |
I: IntoIterator<Item = &'a T>, | |
T: 'a + std::fmt::Debug, | |
{ | |
for i in iter.into_iter() { | |
println!("{:?}", i); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[test] | |
fn test_dev() { | |
#[derive(Debug)] | |
struct Foo { | |
a: i32, | |
b: String, | |
} | |
impl Foo { | |
fn new(a: i32, b: &str) -> Self { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[dependencies] | |
ring = "0.16.20" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Jacob Xie on 8/12/2020. | |
*/ | |
import _ from 'lodash'; | |
import * as moment from 'moment'; | |
export interface StorageValue { | |
data: Object, | |
expiry?: moment.Moment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Jacob Xie on 8/7/2020. | |
* | |
* Simple call child function from parent | |
*/ | |
import React, { | |
forwardRef, | |
useImperativeHandle, | |
useRef |